#include <iostream>
using namespace std;
class Ab
{
public:
int x;
};
class Sd:public Ab
{
public:
Sd()
{
x=8;
}
};
class Wd
{
public:
int y;
};
class Id:public Wd
{
public:
Id()
{
y=10;
}
};
class Nd:public Sd,public Id
{
public:
void disp()
{
cout<<"\nThe Addition value is : "<<x+y;
}
};
int main()
{
Sd n;
Id o;
Nd f;
f.disp();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: