fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. printf("%d",factorial(3));
  5. return 0;
  6. }
  7.  
  8. int factorial(int a){
  9. for(int b=a-1;b>0;b--){
  10. a*=b;
  11. }
  12. return a;
  13. }
  14.  
Success #stdin #stdout 0s 4528KB
stdin
Standard input is empty
stdout
6