Question: 1. Write a Java program that generates a random integer number between 1 and 100 and asks the user to guess what that number is.

1. Write a Java program that generates a random integer number between 1 and 100 and asks the user to guess what that number is. If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." When the user guesses the number, the program should display the number of guesses that the user makes. (Use the Scanner class.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
