Question: Write a program that invites the user to enter several numbers, one at a time, and to find theirmaximum, minimum, and average. Every time you
Write a program that invites the user to enter several numbers, one at a time, and to find theirmaximum, minimum, and average. Every time you enter a number, you contribute its value toa sum that you should initialize to zero. Note that we initially assume the first entered numberto be the maximum and the minimum. As you enter more numbers, we compare each to thecurrent minimum or maximum and update accordingly. We should also keep track of thenumber of values entered to be able to calculate the average of the values entered. Finally, printthe values of the sum, average, minimum, and maximum with appropriate indication to theprogram user.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
