#include
int fact (int);
int main ()
{
int n;
printf (" n = ");
scanf ("%d", &n);
printf (" n! = %d\n\n", fact (n));
return 0;
}
int fact (int n)
{
int i;
int sonuc = 1;
// sonuc = n x (n-1) x (n-2) x . . . x 3 x 2
for (i = n; i > 1; i --) sonuc *= i;
return sonuc;
}