Requirements:
Create a Java program that runs a guessing game. The computer chooses a random number between 1 and 20. The user
continues providing guesses until they have guessed the number. After each guess, let the user know if their guess was correct,
too low or too high. The execution of your program may look as follows:
Im thinking of a number between 1 and 20.
What is your guess: 10
Too high
What is your guess: S
Too Low
What is your guess: 8
Too high
What is your guess: 7
Thats the number was thinking of! Well done.
Additional Information:
- Before the program starts, print the random number to aid testing and debugging.
- Try to figure out how to generate random numbers in Java by doing a Google search. Ifyou have trouble deciphering the
information you find, use the course discussion board to get further clarification.
- Once you have your program running, do some error checking. Check to make sure the user entered a number and that it
is a number between 1 and 20.
Reviews
There are no reviews yet.