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

C++ Program to take input name, class, and roll number from use and display, Write a program to take input name, class and roll number from user and display.

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 is\t"<<clas<<"\nYour rollnumber is\t"<<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

You May Also Like...