A program that asks the user for their name and greets them with their name.
If you want to display Full Name in C++ than you are on a right place.
Example:
#include<iostream>
#include<string>
using namespace std;
int main()
{
string name;
cout<<"Please give Your name : ";
getline(cin, name);
cout<<"Namaste, "<<name;
return 0;
}
Output:
Please give Your name : Rudra Pratap Singh
Namaste, Rudra Pratap Singh
Comments
Post a Comment
If have any douts comment here.