CMPSCI – 235 Guess the Number Program
This is the old. When you run the program, the computer randomly generates a number. Then, the user is to guess the number. Upon guessing wrong, the program gives him/her a hint as to whether the guess is too high or too low. Once the number has been guessed, the game is over.
Create a program to input, keep track of, and check the user’s attempts to guess a randomly generated number. The input portion of the program will be a continuous loop, only breaking out of it when the user either guesses the correct number or by entering -1 to signify giving up. After each guess, the user will be informed of his guess being too high, too low, or exactly correct. Upon exiting the loop, the user is given feedback of their guesses .