usingnamespace std;
int main(){
int friends;
int age;
int kids;
int number;
cout<<"Hello! \n";
cout<<"Im Going To Ask Your A Couple Questions.\n";
system("pause");
cout<<"How Old Are You? \n";
cin>>age;
cout<<"How Many Friends Do You Have? \n";
cin>>friends;
cout<<"How Many Kids Do You Have? \n";
cin>>kids;
cout<<"Whats Your Favorite Number? \n";
cin>>number;
system("pause");
cout<<"You Are "<<age<<" Years Old \n";
cout<<"You Have "<<friends<<" Friends \n";
cout<<"You Have "<<kids<< " Kids \n";
cout<<"And Your Favorite Number Is "<<number<<endl;
system("pause");
return 0;
}
How Would I Add A String Into It To Ask For Your Name;
#include <string>
usingnamespace std;
int main(){
std::string Str;
int friends;
int age;
int kids;
int number;
cout<<"Hello! \n";
cout<<"Im Going To Ask Your A Couple Questions.\n";
system("pause");
cout<<"How Old Are You? \n";
cin>>age;
cout << "Enter your name\n";
cin >> Str;
cout<<"How Many Friends Do You Have? \n";
cin>>friends;
cout<<"How Many Kids Do You Have? \n";
cin>>kids;
cout<<"Whats Your Favorite Number? \n";
cin>>number;
system("pause");
cout << "Your name is " << Str;
cout<<"You Are "<<age<<" Years Old \n";
cout<<"You Have "<<friends<<" Friends \n";
cout<<"You Have "<<kids<< " Kids \n";
cout<<"And Your Favorite Number Is "<<number<<endl;
system("pause");
return 0;
}