Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Pojazd
- {
- int pojemnoscZbiornika;
- int zuzyciePaliwa100;
- int liczbaPasazerow;
- Pojazd (int poj, int zuz, int pas)
- {
- pojemnoscZbiornika = poj;
- zuzyciePaliwa100 = zuz;
- liczbaPasazerow = pas;
- }
- double zapotrzebowanieNaPaliwo (int odleglosc)
- {
- return(double)odleglosc/100.0*zuzyciePaliwa100;
- }
- int zasieg ()
- {
- return pojemnoscZbiornika/zuzyciePaliwa100*100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement