Advertisement
Guest User

zadanie 1

a guest
Mar 30th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.  
  10. using namespace std;
  11.  
  12. struct batonik {
  13. string batonName;
  14. double waga;
  15. int kalorie;
  16. };
  17.  
  18. batonik Snickers = {"Snickers",4.29,364};
  19. cout << "Nazwa batonika: " << Snickers.batonName << endl;
  20. cout << "Waga batonika: " << Snickers.waga << endl;
  21. cout << "Kalorycznosc batonika: " << Snickers.kalorie << endl;
  22.  
  23. cout << "" <<endl;
  24.  
  25. batonik Snack = {"Mocha Munch",2.3,350};
  26. cout << "Nazwa batonika: " << Snack.batonName << endl;
  27. cout << "Waga batonika: " << Snack.waga << endl;
  28. cout << "Kalorycznosc batonika: " << Snack.kalorie << endl;
  29.  
  30. return 0;
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement