#include // A program to compute the factorial of n int main ( ) { int i, n, prod; printf ("Enter n.\n") ; scanf ("%d", &n) ; prod = 1; for (i=1; i<=n; i++) { prod = prod * i; } printf ("Factorial %d = %d\n", n, prod) ; return 0; }