fork download
  1. #include <stdio.h>
  2.  
  3. void increasing(int n){
  4. if(n==0) return;
  5. printf("%d\n",n);
  6. increasing(n-1);
  7. printf("%d\n",n);
  8. }
  9.  
  10. int main() {
  11. int n;
  12. printf("Enter the value of n: \n");
  13. scanf("%d",&n);
  14. increasing(n);
  15.  
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0.01s 5320KB
stdin
10
stdout
Enter the value of n: 
10
9
8
7
6
5
4
3
2
1
1
2
3
4
5
6
7
8
9
10