Advertisement
DrDiagramm

Untitled

Feb 7th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int Timer = 10;
  8. int x;
  9.  
  10. while (Timer > 0) {
  11. cout << "Do NOT enter 5, " << endl;
  12. Timer = Timer - 1;
  13. cin >> x;
  14. if (x==5) {
  15. cout << "Hey! you weren't supposed to enter 5!" << endl;
  16. system("pause");
  17. return 0;
  18. }
  19. }
  20.  
  21. if (x != 5 && Timer == 0) {
  22. cout << "Wow, you're more patient then I am, you win." << endl;
  23. system("pause");
  24. return 0;
  25. }
  26.  
  27.  
  28.  
  29. cout << endl;
  30. system("pause");
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement