Question: PLEASE ANSWER IN C++!!! Write a program that finds the minimum and maximum of a set of numbers entered by the user. Your program should

PLEASE ANSWER IN C++!!!

Write a program that finds the minimum and maximum of a set of numbers entered by the user. Your program should enter a loop in which it repeatedly asks the user to enter a number. The program should exit the loop if the user enters a -1. While in this loop, the program must keep track of the smallest and largest numbers entered by the user. After the user enters a -1 the program should output the minimum and maximum. Users may not enter any numbers less than 0 (other than -1 to stop) or greater than 9999.

Hint: Keep track of the current minimum and maximum in separate variables. Each time the user enters a number, you may need to update these variables.

After printing the minimum and maximum, your program should ask the user if they wish to continue by entering yes (y) or no (n). If they continue, your program should start over, if the user enters n, the program should quit.

In total, you should have two loop structures. (1) an outer loop controlling how many times the user repeats the entire program (Do you wish to continue?). (2) an inner loop that allows the user to repeatedly enter in numbers for which you will find the minimum and maximum.

Here is a sample of the input and output for your program. The user has entered text in red (bold) and the program has printed out text in black.

PLEASE ANSWER IN C++!!! Write a program that finds the minimum and

Your program should not accept any numbers less than -1 or greater than 9999 and should warn the user when they enter numbers out of this range. Your program should not exit just warn the user!

> Please enter as many numbers as you like. Enter 1 to stop. > Please enter a number: 16 > Please enter a number: 46 > Please enter a number: 19 > Please enter a number: 6 > Please enter a number: 98 > Please enter a number: 56 > Please enter a number: 1 > Maximum: 98 > Minimum: 6 > Do you wish to continue? (y) : y > Please enter as many numbers as you like. Enter 1 to stop. > Please enter a number: 9 > Please enter a number: 128 > Please enter a number: 18 > Please enter a number: 1 > Maximum: 128 > Minimum: 9 > Do you wish to continue? (y): n > Goodbye

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!