MarcinKrol

Zad 2 Sprawdzian

Oct 28th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct pracownik
  6. {
  7. string imie;
  8. string nazwisko;
  9. int wiek;
  10. string plec;
  11.  
  12.  
  13. };
  14. int main()
  15. {
  16. pracownik Pracownik1;
  17. Pracownik1.imie="Marcin";
  18. Pracownik1.nazwisko="Krol";
  19. Pracownik1.wiek=18;
  20. Pracownik1.plec='M';
  21.  
  22. cout<<"ImiÄ™ pracownika: "<<Pracownik1.imie<<endl;
  23. cout<<"Nazwisko pracownika: "<<Pracownik1.nazwisko<<endl;
  24. cout<<"Wiek pracownika: "<<Pracownik1.wiek<<endl;
  25. cout<<"Plec pracownika: "<<Pracownik1.plec<<endl;
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment