-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_2.cpp
54 lines (51 loc) · 1.08 KB
/
2_2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// This program is prepared by 21it085 Henil Mendpara
#include "iostream"
using namespace std;
class students
{
public:
char name[10];
char roll_no[10];
int classs;
char division;
void input()
{
cout << "enter your name : ";
cin >> name;
cout << "enter your roll_no : ";
cin >> roll_no;
cout << "enter your class : ";
cin >> classs;
cout << "enter your division : ";
cin >> division;
}
void output()
{
cout << " your name : " << name;
cout << endl;
cout << " your roll_no : " << roll_no;
cout << endl;
cout << " your class : " << classs;
cout << endl;
cout << " your division : " << division;
cout << endl;
}
} S[5];
int main()
{
for (int i = 0; i < 5; i++)
{
cout << "Enter details of " << i + 1 << " student" << endl;
S[i].input();
cout << endl;
}
cout << endl
<< "****************************" << endl;
for (int i = 0; i < 5; i++)
{
cout << "Details of " << i + 1 << " student is " << endl;
S[i].output();
cout << endl;
}
cout<<endl<<endl<<"21IT085 Henil Mendpara";
}