Module: (C++) Loop statement with condition - while


Problem

9 /21


Sum of digits of a number

Problem

Using the previous program, change it so that it finds the sum of the digits of n.

The program should request a single number from the keyboard and display a phrase (for example, for the number 123)

The sum of the digits of number 123 is 6