-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpps.cpp
More file actions
45 lines (37 loc) · 770 Bytes
/
Copy pathOpps.cpp
File metadata and controls
45 lines (37 loc) · 770 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
36
37
38
39
40
41
42
43
44
45
#include<iostream>
using namespace std;
class Employee{
int a ,b ,c ;
public:
int d , e ;
void setdata(int a1 , int b1 ,int c1);
void getdata();
};
void Employee :: getdata(){
cout<<"The Value of a is "<<a<<endl;
cout<<"The Value of b is "<<b<<endl;
cout<<"The Value of c is "<<c<<endl;
cout<<"The Value of d is "<<d<<endl;
cout<<"The Value of e is "<<e<<endl;
}
void Employee :: setdata(int a1 , int b1 , int c1){
a = a1;
b = b1;
c = c1;
}
int main(){
Employee Harry;
Harry.d = 45;
Harry.e = 8;
Harry.setdata(24,54,23);
Harry.getdata();
return 0;
}
/*
Output :
The Value of a is 24
The Value of b is 54
The Value of c is 23
The Value of d is 45
The Value of e is 8
*/