#include <iostream>
usingnamespace std;
int main()
{
int input, x;
for (x = 0; x < 10; x++)
{
cout << "Please enter any number except 5 \n";
cin >> input;
cout << "You entered: " << input << endl;
if (input == 5){
cout << "Hey! I told you not to enter 5! \n";
}
elseif (x == 9){
cout << "Wow, you're more patient then I am, you win. \n";
}
}
return 0;
}
#include <iostream>
usingnamespace std;
int main()
{
int input, counter;
for (counter = 0; counter < 10; counter++){
cout << "Please enter any number except 5. \n";
cin >> input;
cout << "You entered " << input << endl <<endl;
if (input == 5){
cout << "Hey I told you not to enter 5! \n";
break;
}
elseif (counter == 9){
cout << "WoW! You have more patience then I do. You win! \n";
break;
}
}
return 0;
}