Question: What to Do: start In this exercise you should design a flow chart for a program that: sum of digits = 0 Prompts the user

What to Do: start In this exercise you should design a flow chart for a program that: sum of digits = 0 Prompts the user to enter a positive integer number. Then reads the user's input. If the user input is not a positive number, prompts her/him again and again until he/she enters a valid input. enter an integer number Then, it uses a loop to calculate the sum of the digits of the user's input, and displays the value sum, read: number For example, if the user enters the number 94311, the program should print the sum of digits: 9+4+3+1+1, which is 18. The program should end after displaying the sum. Hint: you should use a loop and take advantage of integer division by 10 and modulus of 10. To be consistent in using the variable names please start with the given figure to the right of this box; end You should only use the declared variables sum of digits, and number, and are not allowed to declare any other variables. Note: For your information the range of values that fits into int type is between 2,147,483,647 and as low as -2,147,483,648 (stored as 32 bits). However, your algorithm doesn't need to check for the range
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
