-
Notifications
You must be signed in to change notification settings - Fork 0
/
addition.cpp
65 lines (51 loc) · 988 Bytes
/
addition.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
55
56
57
58
59
60
61
62
63
// #include <iostream>
// #include"hello.h"
// using namespace std;
// int main()
// {
// int num1, num2;
// cin >> num1; //">>"is called extraction operator
// cout << "enter the num2 value\n";
// cin >> num2;
// cout << "value of addition is " << num1 + num2;
// }
// #include <iostream>
// using namespace std;
// class Car {
// public:
// int speed(int maxSpeed);
// };
// int Car::speed(int maxSpeed) {
// return maxSpeed;
// }
// int main() {
// Car myObj;
// cout << myObj.speed(200);
// return 0;
// }
#include<iostream>
using namespace std;
class body
{
public :
string a = "tere gand me jhand";
void boy()
{
cout<<a;
}
// void display()
// {
// cout<<a;
// }
};
class girl: public body
{};
class gender : public girl
{};
int main()
{
gender myobj;
myobj.boy();
// myobj.display();
return 0;
}