int main()
{
int x = 0;
{
//ask user to enter a number except for 5, if number is not 5 keep asking
cout << "Please enter a number other than 5." << endl;
cin >> x;
do
{
cout << "Please enter a number other than 5." << endl;
cin >> x;
} while (x != 5);
// if the user enters 5, cout "Hey! you weren't supposed to enter 5!"
if (x == 5)
{
cout << "Hey! You weren't suppose to enter the number 5!" << endl;
}
}
int tries=0;
do
{
cout << "Please enter a number other than 5." << endl;
cin >> x;
++tries
if (tries == 10)
cout << "You pay to directions well" << endl;
} while (x != 5);