fork download
  1. #include<stdio.h>
  2. void main()
  3.  
  4. {
  5. int n,i;
  6. long long int fact;
  7.  
  8. printf("NUMBER FACTORIAL\n");
  9. printf("------ ---------\n");
  10. for(n=2;n<15;n=n+2)
  11. {
  12. fact=1;
  13. for(i=n;i>1;i--){
  14. fact=fact*i;
  15. }
  16. printf(" %d\t %ld\n",n,fact);
  17. }
  18. }
  19.  
Runtime error #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
NUMBER   FACTORIAL
------  ---------
 2	 2
 4	 24
 6	 720
 8	 40320
 10	 3628800
 12	 479001600
 14	 1278945280