Advertisement
MichalWalczak

Zad 2 Sprawdzian

Oct 30th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct rachunek
  6. {
  7.     string nazwasklepu;
  8.     int podatek;
  9.     int cena;
  10.     string nazwaproduktu;
  11. };
  12. int main()
  13. {
  14.     rachunek struktura;
  15.     struktura.nazwasklepu="zabka";
  16.     struktura.podatek=23;
  17.     struktura.cena=4;
  18.     struktura.nazwaproduktu="Sok bananowy";
  19.     cout << struktura.nazwasklepu << endl << struktura.podatek << endl << struktura.cena << endl << struktura.nazwaproduktu << endl;
  20.     return 0;
  21. }
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement