Write a C program to find Factorial of Given Number


#include<stdio.h>
int main()
{
int a, b, c, d;
printf("Enter number: ");
scanf("%d", & a);
c= 1;
for(b= 1; b <= a; b= b++)
{
c = c * b;
//printf("process = %d \n", c);
}
d= c;
printf("Factorial of given number = %d \n", d);
return 0;
}

Comments