Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //zdefiniuj klase czlowiek zawierajaca pola imie nazwisko data ur wzrost waga
- #include <iostream>
- using namespace std;
- {
- class czlowiek
- {
- public:
- string imie;
- string nazwisko;
- int dzien_ur;
- int mies_ur;
- int rok_ur;
- int wzrost;
- int waga;
- };
- main()
- {
- czlowiek_osoba1;
- osoba1.imie="ewa";
- osoba1.nazwisko="Bem";
- osoba1.dzien_ur=02;
- osoba1.miesiac_ur=04;
- osoba1.rok_ur=4213;
- cout<<osoba1.imie<<endl;
- cout<<osoba1.nazwisko<<endl;
- cout<<osoba1.dzien_ur<<endl;
- cout<<osoba1.miesiac_ur<<endl;
- cout<<osoba1.rok_ur<<endl;
- cout<<osoba1.wzrost<<endl;
- cout<<osoba1.waga<<endl;
- czlowiek_osoba2;
- osoba2.imie="Adam";
- osoba2.nazwisko="MATA";
- osoba2.dzien_ur=06;
- osoba2.miesiac_ur=11;
- osoba2.rok_ur=2131;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement