Question: Please write a c++ program Write a program that will allow the user to enter a set of integers (as many as they want), then


Write a program that will allow the user to enter a set of integers (as many as they want), then prints out a summary of information, as follows: Prompt the user continually to enter a number using a loop, until the value 0 is entered, which will be the signal to stop entering values. (This is sometimes known as a "sentinel' value). Once the sentinel value has been entered, print out the following information: The total number of values that were entered (not including the ending 0) The sum of the input values The number of values entered that were divisible by 10 (not including the ending 0) The maximum value entered by the user The minimum value entered by the user The average (printed to 1 decimal precision) Your output must match mine exactly. See the sample runs below Sample Runs (user input is underlined, to distinguish it from output) Sample Run 1 Input integer (0 to stop): 12 Input integer (O to stop): 4 Input integer (0 to stop): -1 Input integer (o to stop): 5 Input integer (0 to stop) : 18 Input integer (0 to stop): 0 Total: 5 Sum: 28 Divisible by 10: 0 Max: 18 Min: -5 Avg: 5.6 Sample Run 2 Input integer (0 to stop): 4 Input integer (0 to stop): 8 Input integer (0 to stop) : 27 Input integer (0 to stop): 94 Input integer (0 to stop): -1 Input integer (0 to stop): 43 Input integer (0 to stop): 10 Input integer (0 to stop): 0 Total: 7 Sum: 185 Divisible by 10: 1 Max: 94 Min: -1 Avg: 26.4 Sample Run 3 Input integer (0 to stop) : 0 Total: 0 Sum: 0 Divisible by 10: 0 Max: 0 Min: 0 Avg: 0.0 Sample Run 4 Input integer (0 to stop): 5 Input integer (0 to stop): 0 Total: 1 Sum: 5 Divisible by 10: 0 Max: 5 Min: 5 Avg: 5.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
