Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <string>
- using namespace std;
- class Skarbonka
- {
- protected:
- float ile, kasa;
- public:
- float putMoney()
- {
- kasa+=ile;
- return kasa;
- }
- float takeMoney()
- {
- kasa-=ile;
- return kasa;
- }
- };
- class Ja : public Skarbonka
- {
- string imie;
- float ileKasy;
- public:
- void howMoney()
- {
- cout << ileKasy;
- }
- Ja(string i = "BRAK", float ii = 0)
- {
- imie = i;
- ile = ii;
- }
- };
- class Tata : public Skarbonka
- {
- string imie;
- float ileKasy;
- public:
- void howMoney()
- {
- cout << ileKasy;
- }
- Tata(string i = "BRAK", float ii = 0)
- {
- imie = i;
- ile = ii;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement