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

Popular posts from this blog

A program to Add numbers divisible by 3 or 5 in C++

When only Some specific user name will be greeted in a C++ Program.

C++ Programming Language Easy Course