Forked from StabbyMcDuck/gist:9a537709f3cfa22bf9d7
Last active
August 29, 2015 14:03
-
-
Save KronicDeth/641376d90e79e2fa62fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do { | |
cout << "What is your guess?" << endl; | |
cin >> guess; | |
if (guess < magicNumber); | |
{ | |
cout << "You guessed too low!" << endl; | |
} | |
else if (guess > magicNumber); | |
{ | |
cout << "You guessed too high!" << endl; | |
} | |
else if (guess = magicNumber); | |
{ | |
cout << "Your guess is correct! Huzzah!" << endl; | |
} | |
} while ((guess != estimate) && (tries >= 3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment