Question: Write a sentinel loop that repeatedly prompts the user to enter a number and, once the number 1 is typed, displays the maximum and minimum

Write a sentinel loop that repeatedly prompts the user to enter a number and, once the number 1 is typed, displays the maximum and minimum numbers that the user entered. Here is a sample interaction:

Type a number (or -1 to stop): 6 Type a number (or -1 to stop): 2 Type a number (or -1 to stop): 17 Type a number (or -1 to stop): 7 Type a number (or -1 to stop): -1 Maximum was 17 Minimum was 2 

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!