Question: You will write a Java program using do-while loop. The program asks users to guess the license plate of a car between 1-and 81.
You will write a Java program using do-while loop. The program asks users to guess the license plate of a car between 1-and 81. (You will assume that the number picked by the program is 42.) Program prints a message saying whether user found the number (along with the number of valid guesses) or user should decrease or increase the guess. I have a new car. Can you guess my license plate? Make a guess between 1-81: 1 Increase your guess Make a guess between 1-81: 30 Increase your guess Make a guess between 1-81: 50 Decrease your guess Make a guess between 1-81: 46 Decrease your guess Make a guess between 1-81: 44 Decrease your guess Make a guess between 1-81: 42 You have found it at 6 guess. I have a new car. Can you guess my license plate? Make a guess between 1-81: 42 You have found it at 1 guess.
Step by Step Solution
There are 3 Steps involved in it
Certainly Heres a Java program that uses a dowhile loop to implement the guessing game java import j... View full answer
Get step-by-step solutions from verified subject matter experts
