Question: Java Java Problem 1 Generate a random number between 1 and 10 After you generate the random number, prompt the user for a guess. First,
Java

Java
Problem 1 Generate a random number between 1 and 10 After you generate the random number, prompt the user for a guess. First, verify that the guess is between 1 and 10 If it is not, print an error message. Otherwise check whether the user has guessed the number. If so, print a congratulatory message. If the user has not guessed the number, display the number, then determine whether the guess was close. Define "close" as within three numbers. Print a message informing the user whether the guess was close, then wish the user better luck next time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
