#include
class student
{
char name[30];
float marks;
int roll_no;
public:
void getdata();
void putdata();
};
void student :: getdata()
{
cout<<"Enter the name : "; cin>>name;
cout<<"Enter the roll no. :"; cin>>roll_no;
cout<<"Enter the total marks : "; cin>>marks;
}
void student :: putdata()
{
cout<<"Name of the student : "<
void main()
{
int i;
clrscr();
student std[5];
for(i=0;i<5;i++)
{
cout<<"\n \t\tDetails of the student"< std[i].getdata();
}
for(i=0;i<5;i++)
{
cout<<"\nStudent"< std[i].putdata();
}
getch();
}
No comments:
Post a Comment