#include<iostream.h>
#include<conio.h>
class student
{
private:
                int rn;
                char name[20];
                int tm;
public:
                student()
                {
                                cout<<"Enter Roll Number:- ";
                                cin>>rn;
                                cout<<"Enter Name:- ";
                                cin>>name;
                                cout<<"Enter Total Marks:- ";
                                cin>>tm;
                }
                void outdata()
                {
                                cout<<endl<<"Roll No:- "<<rn<<endl;
                                cout<<"Name:- "<<name<<endl;
                                cout<<"Total Marks:- "<<tm<<endl;
                }
};
void main()
{
                clrscr();
                student s;
                s.outdata();
                getch();
}
Advertisements