fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void funkcja(int n)
  5. {
  6. if(n % 15 == 0) {
  7. std::cout << "foobar" << std::endl;
  8.  
  9. }
  10. else if(n % 5 == 0) {
  11. std::cout << "bar" << std::endl;
  12. }
  13. else if(n % 3 == 0) {
  14. std::cout << "foo" << std::endl;
  15. }
  16.  
  17.  
  18. }
  19.  
  20. int main() {
  21. funkcja(5);
  22. funkcja(60);
  23. funkcja(3);
  24. funkcja(30);
  25. funkcja(25);
  26. return 0;
  27. }
Success #stdin #stdout 0s 4516KB
stdin
Standard input is empty
stdout
bar
foobar
foo
foobar
bar