Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include ""
- using namespace std;
- int main(){
- char answer('a');
- do{
- string nameUser("none");
- int age(0);
- cout<<"Hello,what is your name?"<<endl;
- getline(cin,nameUser);
- cout<<"How old are you?"<<endl;
- cin>>age;
- cout<<"\==>User:"<<nameUser<<" Old: "<<age<<endl;
- do{
- cout <<"Again(Y/N)"<<endl;
- cin>> answer;
- cin.ignore();
- }while (answer !='Y' && answer !='N');
- }while( answer == 'Y');
- cout <<"Welcome in C++...";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement