C Program to Find Factorial of a Number using Function
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Enter a Postive Number: ");
fact();
getch();
}
fact()
{
int i,f=1,n;
scanf("%d",&n);
for(i=1; i<=n; i++)
{
f=f*i;
}
printf("The Factorial of a Given Number is %d",f);
return f;
}
Output: