CMSC 122 | ![]() |
"Play a Game" Option
If the user selects "1" in the initial dialog box, your program will proceed as described below.
Before anything shows up on the screen, your program should determine a random value between 1 and 100. Once the value is determined, the game begins with the following prompt box:
Note that the value that is displayed (in this case 61) is the random value that was determined by your program. Why on Earth would you want to reveal the number that the user is supposed to guess? (This doesn't make for a very challenging game!) Well... because your grader needs to see what number has been selected in order to test your work. If you don't display the random value in this prompt box, you will receive 0 points for this portion of the project.
After the user enters his/her guess in the prompt shown above, the program will check if the guess is correct or not. There are two cases: