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