• Дано трехзначное число. Найти число единиц в нем, число десятков в нем, число сотен в нем, сумму его цифр, произведение его цифр

Ответы 1

  • var unitsCount,     tensCount,     hundredsCount,     number : integer;beginreadln(number);unitsCount := number mod 10;tensCount := (number div 10) mod 10;hundredsCount := number div 100;writeln('Count of units: ', unitsCount);writeln('Count of tens: ', tensCount);writeln('Count of hundreds: ', hundredsCount);writeln('Sum of digits: ', unitsCount + tensCount + hundredsCount);writeln('Multiplication of digits: ', unitsCount * tensCount * hundredsCount);end.
    • Автор:

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

Войти через Google

или

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

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

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