Advertisement
Shad0w

Untitled

May 28th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include<iostream>
  2. #include<ctime>
  3. #include<cstdlib>
  4. #include<string>
  5. int main()
  6. {
  7.     using namespace std;
  8.     int x,y,ans;
  9.     do
  10.     {
  11.         cout << "Do you want to continue (Y/N) ?";
  12.         cin >> ans;
  13.         if(ans=='y' || ans=='Y')
  14.         {
  15.             cout << "Hi";
  16.         }
  17.         if(ans=='n' || ans=='N')
  18.         {
  19.             cout << "Good Bye";
  20.             break;
  21.         }
  22.     }
  23.     while((ans != 'N') && (ans != 'n'));
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement