Advertisement
Guest User

Cw2Zad1

a guest
Jan 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Osoba {
  6.     public:
  7.         string imie;
  8.         string nazwisko;
  9.         string ulica;
  10.         int nrDomu;
  11.         string kodPocztowy;
  12.         string miasto;
  13. };
  14.  
  15. int main(int argc, const char * argv[]) {
  16.     Osoba osoba;
  17.    
  18.     osoba.imie = "Maciej";
  19.     osoba.nazwisko = "Rusnarczyk";
  20.     osoba.ulica = "Al. Alkoholikow";
  21.     osoba.nrDomu = 12;
  22.     osoba.kodPocztowy = "12-345";
  23.     osoba.miasto = "Pcim dolny";
  24.    
  25.     cout << "-------------------------------------------------" << endl;
  26.     cout << osoba.imie << " " << osoba.nazwisko << endl;
  27.     cout << osoba.ulica << " " << osoba.nrDomu << endl;
  28.     cout << osoba.kodPocztowy << " " << osoba.miasto << endl;
  29.     cout << "-------------------------------------------------" << endl;
  30.    
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement