C++ Programming

C++ Take Input Name, Class, and Roll Number from User and Display

take input name, class, and roll number from user and display

Write a program in c++ that can ask for name, class and roll number  and display as Hello Your class is and your roll number is

[button color=”red” size=”big” link=”https://namecheap.pxf.io/c/2001466/1291734/5618″ icon=”” target=”true” nofollow=”true”]Don’t miss: .COM for just $0.98![/button]

C Code

void main()
char name[20];
char clas[6];
int roll;

cout<<"nEnter Name:";
cout<<"nEnter Class:";
cout<<"nEnter Rollnumber:";

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

cout<<"nThank you";

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





About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

program to find leap year
C++ Programming

C++ Program to Find Leap Year by Using Function

  • March 3, 2016
Write a program to find if the inputted year is a leap year or not by using the concept of