n! = n x (n-1) x (n-2) x (n-3) x ....
But then how we write a program that compute a factorial? Here's the factorial function
int factorial (int n)
{
int product = 1;
while (n>0)
{
product = n * product;
n--;
}
return product;
}