fork(3) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int test(int a, int b)
  5. {
  6. static int temp=1;
  7. if (temp % b ==0 and temp % a ==0)
  8. return temp;
  9. temp++;
  10. test(a,b);
  11. return temp;
  12. }
  13.  
  14.  
  15.  
  16.  
  17. int main() {cout << test (5,2);
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
10