• Помогите исправить ошибку(не выводит ответ)Ребус ussr+usa=peace
    var
    m: set of byte;
    u,s,r,a,p,e,c: integer;
    begin
    m := [];
    for u := 1 to 6 do
    if not (u in m) then
    begin
    Include(m, u);
    for s := 0 to 6 do
    if not (s in m) then
    begin
    Include(m, s);
    for r := 0 to 6 do
    if not (r in m) then
    begin
    Include(m, r);
    for a := 0 to 6 do
    if not (a in m) then
    begin
    Include(m, a);
    for p := 1 to 6 do
    if not (p in m) then
    begin
    Include(m, p);
    for e := 0 to 6 do
    if not (e in m) then
    begin
    Include(m, e);
    for c := 0 to 6 do
    if not (c in m) then
    begin
    Include(m, c);
    if u * 1000 + s * 100 + s * 10 + r +
    u * 100 + s * 10 + a =
    p * 10000 + e * 1000 + a * 100 + c * 10 + e then
    WriteLn(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e);
    Exclude(m, c)
    end;
    Exclude(m, e);
    end;
    Exclude(m, p);
    end;
    Exclude(m, a)
    end;
    Exclude(m, r)
    end;
    Exclude(m, s)
    end;
    Exclude(m, u)
    end;
    end.

Ответы 3

  • Спасибо!
  • пожалуйста
  • Можно исправить, если во всех циклах вместо "to 6" написать "to 9". Результат получится:9338 + 932 = 10270
    • Автор:

      félix33
    • 5 лет назад
    • 0
  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years