Mail your problems to us on, we will solve it and put the solution here at

Factorial program in c

#include <stdio.h>
int main()
  int c, n, fact = 1;
  printf("Enter a number to calculate it's factorial\n");
  scanf("%d", &n);
  for (c = 1; c <= n; c++)
    fact = fact * c;
  printf("Factorial of %d = %d\n", n, fact);
  return 0;

Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment


Post a Comment