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
Get step-by-step solutions from verified subject matter experts
