#include <iostream>
using namespace std;
class A
{
private:
int x;
public:
A(int);
void Show();
};
A::A(int x)
{
this->x=x;
}
void A::Show()
{
cout<<" "<<x<<endl;
}
class B:public A
{
private:
int y;
public:
B(int int);
void Show();
};
B::B(int y,int x):A(int)
{
this->y=y;
}
void B::Show()
{
cout<<" "<<y<<endl;
}
class C:public B
{
private:
int z;
public:
C(int int int);
void Show();
}
C::C(int z,int y,int x):B(y,x)
{
this->z=z;
}
void C::Show()
{
cout<<" "<<z<<endl;
}
int main()
{
C c(1,2,6);
c.Show( );
return 0;
}
using namespace std;
class A
{
private:
int x;
public:
A(int);
void Show();
};
A::A(int x)
{
this->x=x;
}
void A::Show()
{
cout<<" "<<x<<endl;
}
class B:public A
{
private:
int y;
public:
B(int int);
void Show();
};
B::B(int y,int x):A(int)
{
this->y=y;
}
void B::Show()
{
cout<<" "<<y<<endl;
}
class C:public B
{
private:
int z;
public:
C(int int int);
void Show();
}
C::C(int z,int y,int x):B(y,x)
{
this->z=z;
}
void C::Show()
{
cout<<" "<<z<<endl;
}
int main()
{
C c(1,2,6);
c.Show( );
return 0;
}