if ( cin >> Input ) {
if (Input > Num1)
{
cout << "Try a smaller number." << endl;
}
elseif (Input < Num1)
{
cout << "Try a larger number." << endl;
}
else
{
cout << "Yes you are correct. You have guessed " << Tries << " times" << endl;
}
} else {
// If you land here, then the input could not be parsed as an
// integer, or the input stream reached EOF
}