Question: 1. Write a program which asks the user to enter a number between [100,200]. If an invalid number is entered, the program must ask the
1. Write a program which asks the user to enter a number between [100,200]. If an invalid number is entered, the program must ask the user to re-enter a valid number. Your program must be stuck in this mode until a valid number is entered. Use only one do-while loop in your code. If-else, switches and other constructs are not allowed. A sample output is shown below. Sample Run: Enter a value between 100 and 200: 25 Enter a value between 100 and 200: 225 Enter a value between 100 and 200: 150 A valid number was entered
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
