Advertisement
Guest User

Presentation.cxx

a guest
Jul 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include ""
  4. using namespace std;
  5. int main(){
  6.    
  7.         char answer('a');
  8.         do{
  9. string nameUser("none");
  10. int age(0);
  11. cout<<"Hello,what is your name?"<<endl;
  12. getline(cin,nameUser);
  13. cout<<"How old are you?"<<endl;
  14. cin>>age;
  15. cout<<"\==>User:"<<nameUser<<" Old: "<<age<<endl;
  16.     do{
  17.         cout <<"Again(Y/N)"<<endl;
  18.         cin>> answer;
  19.         cin.ignore();
  20.     }while (answer !='Y' && answer !='N');
  21.     }while( answer == 'Y');
  22.    
  23. cout <<"Welcome in C++...";
  24.     return 0;
  25.    
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement