Hey guys, need some help over here. How would i display the full name I input? Here's the code:
1 2 3 4 5 6 7 8 9 10 11 12
#include<iostream>
usingnamespace std;
int main()
{
char name;
cout<<"Hi there, what's your name?"<<endl;
cin>>name;
system("cls");
cout<<"Good day "<<name<<endl;
system("pause");
return 0;
}
The problem is, it only displays the first letter of the name you inpuut. For instance, I entered "markgreen", it only displays "m". That's all, thanks for reading.