-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtut21.cpp
44 lines (41 loc) · 1011 Bytes
/
tut21.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
#include<iostream>
using namespace std;
void name(){
cout<<'Author: Varun Gupta'<<endl;
}
class home
{
private:
int a,b,c;
public:
int d,e;
// void setdata(int a1,int b1, int c1);
void setdata();
void print()
{
cout<<"The members are :"<<a<<endl;
cout<<"The members are :"<<b<<endl;
cout<<"The members are :"<<c<<endl;
cout<<"The members are :"<<d<<endl;
cout<<"The members are :"<<e<<endl;
}
};
//
void home::setdata()
{
cout<<"Enter the values of a ,b and c "<<endl;
cin>>a>>b>>c;
// a=num1;
// b=num2;
// c=num3;
}
int main(){
name();
home welcome;
welcome.d=34;
welcome.e=43;
// welcome.setdata(23,45,67);
welcome.setdata();
welcome.print();
return 0;
}