How to find factorial value in C

Simple and easy C programming to find  factorial value
#include<stdio.h>

#include<conio.h>
void main ()
{
clrscr();
int i,f=1,num;
printf(“Enter any number to get ftactorial result”);
scanf(“%d”,&num);
for(i=1;i<=num;i++)
f=f*i;
printf(“Factorial of %d is: %d”,num,f);
getch();
}

After Running Program 🙂

 

Leave a Reply