Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- 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 {
- protected:
- int e;
- public:
- void get()
- {
- cout<<"Enter five numbers"<<endl;
- cin>>a>>b>>c>>d>>e;
- }
- void show()
- {
- cout<<"six numbers are"<<endl;
- cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
- }
- };
- int main()
- {
- E obj;
- obj.get();
- obj.show();
- return 0;
- }
Add Comment
Please, Sign In to add comment