Loop statement with condition - while




Task
Time limit: 1000 ms,
Memory limit: 32 Mb

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
Prohibited statements:list;[

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: