Question: Write a program with a loop that lets the user enter a series of positve integers. The user should enter -99 as a sentinel to

 Write a program with a loop that lets the user enter

Write a program with a loop that lets the user enter a series of positve integers. The user should enter -99 as a sentinel to signal the end of the series. If the user enters a negative integer (other than -99), your program should reject the input and prompt the user again for a positive integer, reminding them that -99 is the sentinel After all the numbers have been entered, the program should display the largest and smallest numbers entered. A sample program execution may look like this Please enter a series of positive integers Input as many as you want. hen you are finished, enter"-99" Integer: 3 Integer: 42 Integer: 12 Integer: 5 Integer: -8 WARNING:That is not a positive integer Please continue to enter a series of positive integers When you are finished, enter "-99" Integer: 33 Integer: 11 Integer: 72 Integer: 23 Integer:-99 nimum was 3 Maximum was: 72

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!