Advertisement
PiotrSzewczyk

Zadanie 2/wskaźniki

Nov 2nd, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     struct Rachunek {
  8.     string nazwa_sklepu;
  9.     float podatek;
  10.     float cena;
  11.     string nazwa_produktu;
  12.     };
  13.  
  14.     Rachunek pierwszy;
  15.     pierwszy.nazwa_sklepu="Comfort";
  16.     pierwszy.podatek=23;
  17.     pierwszy.cena=2000;
  18.     pierwszy.nazwa_produktu="Szafka";
  19.  
  20.     cout<<pierwszy.nazwa_sklepu<<endl;
  21.     cout<<pierwszy.podatek<<endl;
  22.     cout<<pierwszy.cena<<endl;
  23.     cout<<pierwszy.nazwa_produktu<<endl;
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement