#include<iostream.h>
#include<conio.h>
class first
{
protected:
int a, b;
public:
void input();
void output();
};
class second : public first
{
protected:
float c, d;
public:
void input();
void output();
};
class third : public first
{
protected:
char e, f;
public:
void input();
void output();
};
class fourth : public second, public third
{
public:
void input();
void output();
};
void first :: input()
{
cout<<"Entry any two integers : " ;
cin>>a>>b;
}
void first :: output()
{
cout<<"The entered integers are : "<<endl<<a<<endl<<b<<endl;
}
void second :: input()
{
first :: input();
cout<<"Enter any two float numbers : ";
cin>>c>>d;
}
void second :: output()
{
first :: output();
cout<<"The entered float number are : "<<endl<<c<<endl<<d<<endl;
}
void third :: input()
{
first :: input();
cout<<"Enter any two characters : ";
cin>>e>>f;
}
void third :: output()
{
first :: output();
cout<<"The entered characters are : "<<endl<<e<<endl<<f<<endl;
}
void fourth :: input()
{
second :: input();
third :: input();
}
void fourth :: output()
{
second :: output();
third :: output();
}
int main()
{
class fourth obj;
clrscr();
obj.input();
obj.output();
getch();
return 0;
}