Question: Review of Selection and Repetition Statements Write a Java Program to allow a user to guess a persons age until they get it correct. After
Review of Selection and Repetition Statements
Write a Java Program to allow a user to guess a persons age until they get it correct. After each guess, the user must be told whether their guess was correct, too high, or too low. Once the user enters the correct age, the program must display how many guesses it took the user to guess the correct age.
Example Output:
How old is Jack? 19 Too low, guess again
How old is Jack? 25 Too high, guess again
How old is Jack? 20 Too low, guess again
How old is Jack? 21 Correct! It took you 4 guesses to get it right.
PLEASE FOLLOW THE INSTRUCTIONS AND THE EXAMPLE OUTPUT GIVEN!!!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
