C++ Program to take input name, class, and roll number from user and display

0
2
digitalample eye

Write a program to ask name and roll number and print as Hello!! <name> your class is <class> your roll number is<roll>

Write a program in c++ which can ask for name, class and roll number  and display as Hello <name> Your class is <class> and your roll number is <roll number>
Write a program to take input name, class and roll number from user and display. 

C Code

#include<iostream.h>
#include<conio.h>
void main()
{
char name[20];
char clas[6];
int roll;

cout<<"nEnter Name:";
cin>>name;
cout<<"nEnter Class:";
cin>>clas;
cout<<"nEnter Rollnumber:";
cin>>roll;

cout<<"nHello!!t"<<name<<"nYour class ist"<<clas<<"nYour rollnumber ist"<<roll;

cout<<"nThank you";

cout<<"nPress any key to continue…";

getch();

}

Output

Program to take input name, class, and roll number from use and display

LEAVE A REPLY

Please enter your comment!
Please enter your name here