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