Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. //zdefiniuj klase czlowiek zawierajaca pola imie nazwisko data ur wzrost waga
  2. #include <iostream>
  3. using namespace std;
  4. {
  5. class czlowiek
  6. {
  7. public:
  8. string imie;
  9. string nazwisko;
  10. int dzien_ur;
  11. int mies_ur;
  12. int rok_ur;
  13. int wzrost;
  14. int waga;
  15. };
  16. main()
  17. {
  18. czlowiek_osoba1;
  19. osoba1.imie="ewa";
  20. osoba1.nazwisko="Bem";
  21. osoba1.dzien_ur=02;
  22. osoba1.miesiac_ur=04;
  23. osoba1.rok_ur=4213;
  24. cout<<osoba1.imie<<endl;
  25. cout<<osoba1.nazwisko<<endl;
  26. cout<<osoba1.dzien_ur<<endl;
  27. cout<<osoba1.miesiac_ur<<endl;
  28. cout<<osoba1.rok_ur<<endl;
  29. cout<<osoba1.wzrost<<endl;
  30. cout<<osoba1.waga<<endl;
  31. czlowiek_osoba2;
  32. osoba2.imie="Adam";
  33. osoba2.nazwisko="MATA";
  34. osoba2.dzien_ur=06;
  35. osoba2.miesiac_ur=11;
  36. osoba2.rok_ur=2131;
  37.  
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement