Question: IntelliJ Java Your program should generate a random number between 1 and 10, and challenge the user to guess the number. Write a loop that
IntelliJ Java
Your program should generate a random number between 1 and 10, and challenge the user to guess the number.
Write a loop that asks the user to guess a number that the computer is thinking of. Print a success message if they guess correctly.
If the user does not guess correctly, tell the user that they need to guess higher, or lower, and ask the user to try again.
The user should be able to have as many guesses as they need.
Optional extras: tell the user how many guesses they needed to get the right number
The ability to play again without restarting the program. Hint enclose the game logic in another while loop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
