\* e.g use of functions factorials *\
\* fact(n) = n*(n-1)*....2*1 *\
#include <stdio.h>
main()
{
int n, m;
printf("Enter a number: ");
scanf("%d", &n);
m = fact(n);
printf("The factorial of %d is %d.\n", n, m);
exit(0);
}
fact(n)
int n;
{
if (n == 0)
return(1);
return(n * fact(n-1));
}