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.
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
Post a Comment