Code for Program to find the factorial of a given number using function declaration in C Programming
#include <stdio.h>
#include <conio.h>
void main()
{
int n,x;
int fun(int);
printf("enter any no...");
scanf("%d",&n);
x=fun(n);
printf("factorial of %d is %d ",n,x);
getch();
}
fun(int z)
{int fact=1;
for(;z!=0;z--)
{ fact*=z ;
}
return(fact);
}