Advertisement
MBrendecke

Untitled

Jul 5th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using namespace std;
  2.  
  3. struct Pfand {
  4.     int Glasflasche;
  5.     int Plastikflasche;
  6. };
  7.  
  8. Pfand eingabe() {
  9.     Pfand wert;
  10.     cin >> wert.Glasflasche;
  11.     cin >> wert.Plastikflasche;
  12.     return wert;
  13. }
  14.  
  15. int berechnung(Pfand wert)
  16. {
  17.     int ret = wert.Glasflasche * wert.Plastikflasche;
  18.     cout << ret;
  19.     return ret;
  20. }
  21.  
  22.  
  23. int main()
  24. {
  25.     Pfand pfand = eingabe();
  26.     int ret = berechnung(pfand);
  27.     cout << "Hello World!" << endl;
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement