#include<iosteram.h>
#include<conio.h>
Class M
{
Protected:
Int m;
Public :
Void get_M();
};
Class N
{
Protected:
Int n;
Public:
Void get_N();
};
Class p: public M, public N
{
Public:
Void disply(void);
};
Void M ::get_m(int x)
{
m=x;
}
Void N::get_n(int y)
{
n=y;
}
Void P:: disply(void)
{
Cout<<”m=”<<m<<endl;
Cout<<”n=”<<n<<endl;
Cout<<”m*n=”<<m*n<<endl;
}
int main()
{
P p;
p.get_m(10);
p.get_n(20);
p.display();
return 0;
}
OUTPUT
m=10
n=20
m*n=200
Not Satisfied ? Just search & get the result
Related posts:
