Question: IN JAVA A simple guessing game Write a program that will generate a random number between 1 and 10 and allow the user to guess
IN JAVA
A simple guessing game Write a program that will generate a random number between 1 and 10 and allow the user to guess the correct number. The user should be llowed to keep guessing until they guess the correct number. They will start with 10 points and will have 2 points deducted for each guess. You should continue to deduct 2 points per guess even when the points become negative. Required: user enters a number between 1 and 10. If a number out of range is entered you should display a message and allow them to input again, You must use a while loop to solve the problem. Please note that a do-while loop is not a while loop. When the user guesses correctly tell them their score and how many guesses it took for them to guess correctly Please note, you are required to use a whille loop. Also note that a do-while is not a while loop. . Input-A guess between 1 and 10 Process-The number of guesses and the point total Output- The users score and the number of guesses The following is an example of how your program should function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
