28/01/2015

Print user Name in C++

The program will asked user to enter his full name but welcome the person with first name or sure name.

Source Code

#include<iostream>
using namespace std;
int main ()
{
 cout<<"\t \t\ t LEP Tutorials \n \n \n";
 string name;
 cout<<"Enter Your Name : ";
 cin>>name;
 cout<<endl<<endl;
 cout<<"Hi ! "<<name<<" Welcome to LEP.\n ";
 return 0;
}

Output of the Program

Print user Name in C++

No comments:

Post a Comment