158. C Program to calculate factorial Number using static.
How does this program work?
- This Program is used to calculate factorial number using static.
Here is the code
int main()
{
//Find factorial a number using static
int n=5;
int i,f;
f=i=1;
while(i<=n)
{
f*=i;
i++;
}
printf("The Factorial of %d is : %d",n,f );
return 0;
}