Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "iostream"
- #include "stdio.h"
- #include "math.h"
- #include "iomanip"
- #include "string.h"
- #include <stdio.h>
- #include <conio.h>
- using namespace std;
- class Car {
- private:
- int color, speed, weels;
- public:
- Car(){
- color = 1;
- speed = 135;
- weels = 4;
- get();
- }
- void set (int color1, int speed1, int weels1){
- color = color1;
- speed = speed1;
- weels = weels1;
- }
- void get (){
- cout << "Color is "<< color <<" | "<< "Speed is "<< speed <<" | "<<"Weels is " <<weels<<endl;
- }
- protected:
- int proizvoditel;
- };
- class Story : private Car {
- public:
- Story(int p){
- proizvoditel = p;
- cout << "proizvoditel - "<< proizvoditel<< endl;
- }
- };
- int main()
- {
- Car G1;
- G1.set(2, 150, 4);
- G1.get();
- Story p(111);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement