factorial of a number formula code example Example: factorial formula factorial formula n! = n * ( n - 1 ) *...*1