fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int count=0;
  4. void f(int& n){
  5. if(n==0){
  6. // cout<<n<<endl;
  7. // n--;
  8. return;
  9. }
  10. cout<<n<<endl;
  11. n--;
  12. f(n);
  13. }
  14. int main() {
  15. int num=4;
  16. f(num);
  17. }
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
4
3
2
1