fork download
  1. #include<stdio.h>
  2. int f(int n)
  3. {
  4.  
  5. if(n==0)
  6. return 1;
  7.  
  8. return f(n-1)*n;
  9. }
  10.  
  11.  
  12.  
  13.  
  14.  
  15. int main()
  16. {
  17. int n;
  18.  
  19. scanf("%d",&n);
  20.  
  21. printf("%d",f(n));
  22.  
  23.  
  24. return 0;
  25. }
  26.  
  27.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty