Guest User

Untitled

a guest
Mar 5th, 2014
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. #define MyNum 5
  5. int main()
  6. {
  7.     int number = 0;
  8.     int total = 0;
  9.  
  10.     do{
  11.         cout << "Enter any number other " << MyNum << endl;
  12.         cin >> number;
  13.        
  14.         total = total + 1;
  15.        
  16.             if (total > 9){
  17.            
  18.                 system("CLS");
  19.  
  20.                 cout << "good job you win. " << "\n";
  21.  
  22.                 system("pause");
  23.  
  24.                     break;
  25.             }
  26.     } while (number != MyNum);
  27.         cout << "You are an idiot . " << endl;
  28.         system("pause");
  29.        
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment