Write a program Digits that prompts the user to input a positive integer and then outputs the number reversed and the sum of the digits. For example, if the user enters the number 3456, then your...


Write a program Digits that prompts the user to input a positive integer and then outputs the number reversed and the sum of the digits. For example, if the user enters the number 3456, then your program should output 6543 and the sum as 18.



Use a while loop.



EXAMPLE OUTPUT:





Enter an integer: 3478246 Number reversed: 6428743 Sum of digits: 34







You may assume the user enters a number smaller than the max int (2,147,483,647).



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here