I'm trying to get the specific output of
What is your name?
What is your age?
Hello, Mr. Alex Whatmore (35)!
This is my code:
#include <iostream>
using namespace std;
#include <string>
int main()
{
string name;
int age;
cout<<"What is your name?";
cin>>name;
cout<<"What is your age?";
cin>>age;
cout<<"Hello,"<<name;
cout<<age;
cout<<"!";
return 0;
}
How could I put the numbers in brackets or how could I allow the user to input their first and last name?