Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Write a program using while loop that can read an integer number and determines whether the sum of the cubes of the digits is equals to the number...

Write a program using while loop that can read an integer number and determines whether the sum of the cubes of the digits is equals to the number itself. display a message indicating whether the sum of the cubes is equal or not equal to the number.

For example, if the number 563 is entered as input, the sum of the cubes of the digits is

5^3 + 6^3 + 3^3 = 125+ 216 +27 = 368

which is not equal to 563.

On the other hand, if the number 371 is entered as input, the sum of the cubes of the digits isĀ 

3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371

which equal to 371.

The program will be repeated until input number is equal to the sum of the cubes.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question