fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int n, m, o,p, facte, facto;
  5. for (n=14;n>= 1;n--){
  6. facte=1;
  7. if (n%2!=0){}
  8. else{
  9. for (m=1;m<=n ;m++){
  10. facte=facte*m;
  11. }
  12. printf("Factorial of %d is %d\n", n, facte);
  13. }
  14. }
  15. for (n=1;n<= 14;n++){
  16. facte=1;
  17. if (n%2!=0){
  18. for (m=1;m<=n ;m++){
  19. facte=facte*m;
  20. }
  21. printf("Factorial of %d is %d\n", n, facte);
  22. }
  23. else{}
  24. }
  25. }
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
Factorial of 14 is 1278945280
Factorial of 12 is 479001600
Factorial of 10 is 3628800
Factorial of 8 is 40320
Factorial of 6 is 720
Factorial of 4 is 24
Factorial of 2 is 2
Factorial of 1 is 1
Factorial of 3 is 6
Factorial of 5 is 120
Factorial of 7 is 5040
Factorial of 9 is 362880
Factorial of 11 is 39916800
Factorial of 13 is 1932053504