#include<iostream>
#include<string>
using namespace std;
class Teacher
{
private:
string name;
int a;
string sex;
string address;
int s[11];
string title;
public:
void get_value();
void display();
};
class Cadre:protected Teacher
{
protected:
string post;
};
class TeacherCadre:protected Cadre
{
protected:
float wages;
public:
void show();
};
void Teacher::get_value()
{
cin>>name>>a>>sex>>title>>address;
for(int i=0;i<11;i++)
{
cin>>s[i];
}
}
void Teacher::display()
{
cout<<"名字:"<<name<<endl;
cout<<"年龄:"<<a<<endl;
cout<<"性别:"<<sex<<endl;
cout<<"职称:"<<title<<endl;
cout<<"地址:"<<address<<endl;
cout<<"电话:";
for(int i=0;i<11;i++)
{
cout<<s[i];
}
cout<<endl;
}
void TeacherCadre::show()
{
Teacher a;
a.get_value();
cin>>post>>wages;
a.display();
cout<<"职务:"<<post<<endl;
cout<<"工资:"<<wages;
}
int main()
{
TeacherCadre c;
c.show();
return 0;
}