05_factorial.c 177 B

1234567891011
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n = 10;
  5. int factorial = 1;
  6. for (int i = 1; i <= n; i++)
  7. factorial *= i;
  8. printf("Factorial of %d is %d\n", n, factorial);
  9. return 0;
  10. }