Question: Create a program in Java that does the following Prompt the user to enter a number between 1 - 5 inclusive If the user enters

Create a program in Java that does the following
Prompt the user to enter a number between 1-5 inclusive
If the user enters a number outside of this range, make them re-enter the number.
Depending on the number the user chooses, tell them they won a prize using a "for" loop
Each number must have a different prize and your prizes must be different from the example in class
The "for" loop will run based on the number they input. If the user input 3, the loop will run three times displaying prize number 3 each time//sample output
Enter a number between 1-5 inclusive. 6 You have entered an incorrect number. Enter a number between 1-5 inclusive. 4 You have won the white rabbit! You have won the white rabbit! You have won the white rabbit! You have won the white rabbit! //

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!