• Автомат получает на вход трёхзначное десятичное число. По полученному числу строится новое десятичное число по следующим

Ответы 1

  • Program razryadi;var a, b, c , z, summax, summin: integer;beginwriteln (z);readln (z);begin;a := z div 100;b := z div 10 mod 10;c := z mod 100 mod 10;end;begin;if (a > b) and (b > c) thensummax := a + b;summin := b + c;if (a > c) and (c > b) thensummax := a + c;summin := b + c;if (b > c) and (c > a) thensummax := a + c;summin := a + c;if (b > a) and (a > c) thensummax := a + b;summin := a + c;if (c > a) and (a > b) thensummax := a + c;summin := a + b;if (c > b) and (b > a) thensummax := c + b;summin := a + b;end;begin;if summin >= summax thenwrite (summax, summin)else write (summin, summax);end;end.
    • Автор:

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

Войти через Google

или

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

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

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