Type in a number to calculate its factorial.
The code multiplies a number by every positive whole number below (e.g., 3 × 2 × 1) to find the number's factorial. Only two variables are needed: factor and product.