CPPForSchool.com: Library Function Set 1: Assignment 6

6. Write a C++ program to implement the Number Guessing Game. In this game the computer chooses a random number between 1 and 100, and the player tries to guess the number in as few attempts as possible. Each time the player enters a guess, the computer tells him whether the guess is too high, too low, or right. Once the player guesses the number, the game is over.


This assignment was rather fun.  My approach was slightly different when compared to the sample source.  It is also important to note that when the user inputs anything that is not a number, it will errors into an infinite loop.  At this time, I am unsure how to correct this issue.






Comments

Popular posts from this blog

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 9

CPPForSchool.com: Array - Single Dimension Set 1 Assignment 6

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 8