Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<ctime>
- #include<cstdlib>
- #include<string>
- int main()
- {
- using namespace std;
- int x,y,ans;
- do
- {
- cout << "Do you want to continue (Y/N) ?";
- cin >> ans;
- if(ans=='y' || ans=='Y')
- {
- cout << "Hi";
- }
- if(ans=='n' || ans=='N')
- {
- cout << "Good Bye";
- break;
- }
- }
- while((ans != 'N') && (ans != 'n'));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement