#include<iostream.h>
#include<constream.h>
class A { protected : int a;};
class B { protected : int b;};
class C { protected : int c;};
class D { protected : int d;};
class E : public A,B,C,D
{
int e;
public:
void getdata()
{
cout<<"\n Enter values of a,b,c,d,e:\n";
cin>>a>>b>>c>>d>>e;
}
void showdata()
{
cout<<"\n a="<<a<<"\n b="<<b<<"\n c="<<c<<"\n d="<<d; cout<<"\n e="<<e;
}
};
void main()
{
clrscr();
E X;
X.getdata();
X.showdata();
getch();
}
No comments:
Post a Comment