fork download
  1. #include <stdio.h>
  2. int factorial(int n);
  3.  
  4. main(void) {
  5. // your code goes here
  6. int (*pf)(int);
  7. pf = factorial;
  8. printf("%d",pf(3));
  9. }
  10.  
  11. int factorial(int n){
  12. if (n<=1)
  13. return 1;
  14. else
  15. return n*factorial(n-1);
  16. }
  17.  
  18.  
  19.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
6