Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Posciel
- {
- public:
- float szerokosc;
- float dlugosc;
- string kolor;
- int cena;
- string nazwa_producenta;
- Posciel (float=2, float=2.2, string="bialy", int=150, string="ikea");
- void wyswietl ()
- {
- cout << "szerokosc poscieli:" << szerokosc <<endl<< "Dlugosc poscieli:"<< dlugosc <<endl<< "Kolor poscieli:" << kolor <<endl << "Cena Poscieli:" <<cena <<endl << "Producent poscieli:"<< nazwa_producenta << endl;
- }
- };
- Posciel::Posciel (float s; float d; string b, int c, string n)
- {
- szerokosc=s;
- dlugosc=d;
- kolor=b;
- cena=c;
- nazwa_producenta=n;
- wyswietl();
- }
- int main()
- {
- Posciel (2,2.2,"bialy",150,"ikea")
- klient.wyswietl ();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement