using namespace std; is a nice shorthand, but generally it's a good habit to fully qualify library stuff, so that there isn't any name-clashing with your code, or with code in some library you're...
Type: Posts; User: CodeMonkey
using namespace std; is a nice shorthand, but generally it's a good habit to fully qualify library stuff, so that there isn't any name-clashing with your code, or with code in some library you're...
All kinds of stuff I missed.
There's the semicolon, too.
else (guess == number);
cout << "You guessed the number!";
//This code is equivalent to:
//else {}
//cout << "You guessed the...
Looks a lot better. For the sake of logic flow, you might consider putting all of the stuff happening in your loop that is after the "break" -- you might consider putting all of that in the "if...
if (choice == 'Y' || 'y')
Your attempt at using your knowledge of English to say something in C++ is natural and understandable. But in C++, this line is read as "if choice=='Y', or if 'y' is...