#include <iostream>
using namespace std;
class A
{
public:
int x,y;
void getdata()
{
cout<<"\n The values are : ";
cin>>x>>y;
}
};
/*class B:public A
{
public:
void sum()
{
cout<<"\n The sum is : "<<x+y;
}
};*/
class C:public A
{
public:
void product()
{
cout<<"\n The product is : "<<x*y;
}
};
int main()
{
// B b;
// b.getdata();
// b.sum();
C o;
o.getdata();
o.product();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: