Guest User

Untitled

a guest
Dec 11th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class Human {
  4.    
  5.     public:
  6.     int age;
  7.     int rost;
  8.     void information() {
  9.         std::cout << "я человек";
  10.         };
  11.     };
  12. class Pianist {
  13.     public:
  14.     void penie() {
  15.         std::cout << "Я пою ля-ля-ля";
  16.         };
  17.     };
  18. class Doctor: public Human, public Pianist {
  19.         public: void say() {
  20.         std::cout << "Я лечу" << age;
  21.         };
  22.         void information() {
  23.         std::cout << "я доктор а не человек";
  24.            
  25.             }
  26.    
  27.     };
  28.     int main ()
  29.    
  30.     {
  31.         Doctor a;
  32.         a.age = 30;
  33.         a.say();
  34.         a.penie();
  35.         a.information();
  36.         return 0;
  37.         }
Add Comment
Please, Sign In to add comment