Skip to content

COSC2947 - C++ Object-Oriented Programming @ Algoma University | Assignment 2 Question 1

Notifications You must be signed in to change notification settings

ascheid/COSC2947-A2Q1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

COSC2947-A2Q1

COSC2947 - C++ Object-Oriented Programming @ Algoma University | Assignment 2 Question 1

Assignment description:

(Guess-the-number Game) Write a program that plays the game of "Guess the number" as follows. Your program chooses the number to be guessed by selecting an integer at random in the range 1 to 1000. The program the displays the following:

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.

The player then types a first guess. The program responds with one of the following:

1. Excellent! You guessed the number!
   Would you like to play again (y or n)?
2. Too low! Try again.
3. Too high! Try again.

If the player's guess is incorrect, your program should loop until the player finally gets the number right. Your program should keep telling the player Too high or Too low to help the player "zero in" on the correct answer.

About

COSC2947 - C++ Object-Oriented Programming @ Algoma University | Assignment 2 Question 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages