#include<iostream>
using namespace std;
int main()
{
char name[20];
cout<<"Enter your name: ";
cin>>name;
cout<<"Your Name is : "<< name;
return 0;
}
Output of program
Enter your name: Earth
Your Name is : Earth
Note: This program will be able to read only one word as your name.
using namespace std;
int main()
{
char name[20];
cout<<"Enter your name: ";
cin>>name;
cout<<"Your Name is : "<< name;
return 0;
}
Output of program
Enter your name: Earth
Your Name is : Earth
Note: This program will be able to read only one word as your name.
No comments:
Post a Comment