fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int trzy(int kwota) {
  5. int ile = 0;
  6.  
  7. ile += kwota / 5;
  8. kwota = kwota % 5;
  9.  
  10. ile += kwota / 3;
  11. kwota = kwota % 3;
  12.  
  13. ile = ile + kwota;
  14.  
  15. return ile;
  16. }
  17.  
  18. int main() {
  19. cout << trzy(11) << " , " << trzy(99) << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
3 , 21