Advertisement
Guest User

Untitled

a guest
Oct 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. struct osoba
  8. {
  9.     int wiek;
  10.     string imie, nazwisko;
  11. }x;
  12.  
  13. void wczytaj()
  14. {
  15.     cout<<"Podaj swoj wiek: "<<endl;
  16.     cin>>x.wiek;
  17.     cout<<"Podaj soje imie: "<<endl;
  18.     cin>>x.imie;
  19.     cout<<"Podaj swoje nazwisko: "<<endl;
  20.     cin>>x.nazwisko;
  21.    
  22. }
  23.  
  24. void pokaz()
  25. {
  26.     cout<<x.wiek<<endl;
  27.     cout<<x.imie<<endl;
  28.     cout<<x.nazwisko;
  29. }
  30.  
  31.  
  32.  
  33. int main()
  34. {
  35.     wczytaj();
  36.     pokaz();
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement