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