#include <iostream>
using namespace std;
class student
{
char name[30];
int roll;
int marks;
static int batch;
static char faculty[50];
public:
void input();
void display();
};
int student::batch=2069;
char student::faculty[50]="electronics and communication";
void student::input()
{
cout<<endl<<"please enter your name ";
cin>>name;
cout<<endl<<"please enter you roll ";
cin>>roll;
cout<<endl<<"please emter your mark ";
cin>>marks;
}
void student::display()
{
cout<<endl<<name;
cout<<endl<<roll;
cout<<endl<<marks;
cout<<endl<<batch;
cout<<endl<<faculty;
}
int main()
{
student s[5];
cout<<endl<<"STUDENT RECORDS"<<endl;
for(int i=0;i<5;i++)
{
s[i].input();
}
for(int i=0;i<5;i++)
{
s[i].display();
}
return 0;
}
using namespace std;
class student
{
char name[30];
int roll;
int marks;
static int batch;
static char faculty[50];
public:
void input();
void display();
};
int student::batch=2069;
char student::faculty[50]="electronics and communication";
void student::input()
{
cout<<endl<<"please enter your name ";
cin>>name;
cout<<endl<<"please enter you roll ";
cin>>roll;
cout<<endl<<"please emter your mark ";
cin>>marks;
}
void student::display()
{
cout<<endl<<name;
cout<<endl<<roll;
cout<<endl<<marks;
cout<<endl<<batch;
cout<<endl<<faculty;
}
int main()
{
student s[5];
cout<<endl<<"STUDENT RECORDS"<<endl;
for(int i=0;i<5;i++)
{
s[i].input();
}
for(int i=0;i<5;i++)
{
s[i].display();
}
return 0;
}
No comments:
Post a Comment