-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathLAB4.cpp
More file actions
35 lines (32 loc) · 724 Bytes
/
Copy pathLAB4.cpp
File metadata and controls
35 lines (32 loc) · 724 Bytes
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
#include<iostream>
#include<iomanip>
using namespace std;
class student
{
string name;
int roll;
float marks;
public:
int enter()
{
cout<<"Enter the name of student ="<<endl;
cin>>name;
cout<<"Enter the roll no. of student ="<<endl;
cin>>roll;
cout<<"Enter the marks of student="<<endl;
cin>>marks;
}
int display()
{
cout<<"The name of student is="<<setw(4)<<name<<endl;
cout<<"The roll of student is="<<setw(4)<<roll<<endl;
cout<<"The marks of student is="<<setw(4)<<marks<<endl;
}
};
int main()
{
system("cls");
student s1;
s1.enter();
s1.display();
}