How to calculate factorial of a number?
Factorial is defined as the product of positive integer with all its lowest value numbers. It is denoted by the symbol (!). Learn how to calculate factorial by following the simple steps given below
Formula for Factorial Calculation:
n! = n x (n "“ 1) x (n "“ 2) · · · 3 x 2 x 1
Step 1: Let us consider an example, What is 5!?
Here, n = 5
Step 2: Substitute the values in the formula,
5! = 5 x (5-1) x (5-2) x (5-3) x (5-4)
= 5 x 4 x 3 x 2 x 1
= 20 x 6
= 120
The factorial of 5 is 120.