Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int Timer = 10;
- int x;
- while (Timer > 0) {
- cout << "Do NOT enter 5, " << endl;
- Timer = Timer - 1;
- cin >> x;
- if (x==5) {
- cout << "Hey! you weren't supposed to enter 5!" << endl;
- system("pause");
- return 0;
- }
- }
- if (x != 5 && Timer == 0) {
- cout << "Wow, you're more patient then I am, you win." << endl;
- system("pause");
- return 0;
- }
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement