WELCOME BACK CODERS, hope you are enjoying our blogs
have a good day.
IN THIS PROGRAM THE USER NEEDS TO INPUT A NUMBER AND ITS FACTORIAL WILL BE PRINTED.
int c, n, fact = 1;
printf("Enter a number to calculate its factorial\n");
for (c = 1; c <= n; c++)
fact = fact * c;
printf("\n Factorial=%d ",fact);