Question: 1. You will create a simple program that prints one of four messages, based on user input. (a) If the user enters the integer 1,
1. You will create a simple program that prints one of four messages, based on user input.
(a) If the user enters the integer 1, output One is the loneliest number.
(b) If the user enters the integer 2, output Two can be as bad as one.
(c) If the user enters the integer 3, output Three is one too many.
(d) If the user enters the integer 4, output Four is the last number today.
2. The program will prompt the user to enter a number from 1 to 4.
3. If the number is less than 1 or greater than 4 the program will output a message indicating that the input was not in range. And then the program will exit.
4. You will assume that the user always inputs integers and that no special error handling is needed.
5. You DO NOT need a loop or more than one variable, nor do you need any sentinel value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
