CSC 330 - Object-Oriented Programming & Design Using
Visual C++
Professor B. Domanski - CSI/CUNY
Lab #2B
Objective: Write a program that plays the game of "guess
the number".
How to Play: Your program chooses the number to be guessed by
selecting an integer in the range of 1 to 1000. The program creates a
dialog box that displays something like
I have a number between 1 and 1000.
Can you guess my number?
Please enter your first guess:
The player enters a first guess. The program displays a message box
containing one of the following:
Excellent! You guessed the number.
Too low - try again.
Too high - try again.
If the player's guess is incorrect, your program should continue until
the player finally gets the number correct. Your program should keep
telling the player "Too high" or "Too low"
to help the player "zero in" on the correct answer. Display the
total number of guesses made with each guess. Allow the user to play a new
game without exiting the application and re-starting it.