#include<iostream>
using
namespace std;
class A
{
public:
int a,b;
void f1()
{
cout<<"Enter the nos."<<endl;
cin>>a>>b;
}
};
class
B:public A
{
public:
int sum;
void add()
{
sum = a+b;
cout<<"The sum is
"<<sum<<endl;
}
};
class C:
public A
{
public:
void subtract()
{
int diff;
diff = a-b;
cout<<"the difference is
"<<diff<<endl;
}
};
class D:
public A
{
public:
void multiply()
{
int product;
product=a*b;
cout<<"The product is"<<product<<endl;
}
};
int main()
{
B obj1;
obj1.f1();
obj1.add();
C obj2;
obj2.f1();
obj2.subtract();
D obj;
obj.f1();
obj.multiply();
}