Given a two-digit number n and number a. Determine: a) whether the sum of its digits is a two-digit number (output
Given a two-digit number n and number a. Determine: a) whether the sum of its digits is a two-digit number (output YES or NO in the first line); b) whether the sum of the digits of the entered number n is greater than a (output YES or NO in the second line). Input: the number n is entered in the first line (10<=n<=99), the number a is entered in the second line (0<= a<=99). Output: output the answers to the task questions. Prohibited operators: and; or; not.
Zimniy_Son 43
Пожалуйста, вот пошаговое решение вашей задачи:1. Сначала разделим число
2. Просуммируем полученные десятки и единицы, чтобы найти сумму цифр числа
3. Проверим, является ли сумма цифр числа
4. Проверим, является ли сумма цифр числа
Итак, вот пошаговое решение для данной задачи:
1. Вводим число
2. Вычисляем десятки и единицы числа
3. Вычисляем сумму цифр числа
4. Проверяем, является ли сумма цифр числа
5. Проверяем, является ли сумма цифр числа
Теперь вы можете использовать это пошаговое решение, чтобы получить ответ на вашу задачу.