How is a number passed to the factorial function?

In the above program, suppose the user inputs a number 6. The number is passed to the factorial () function. In this function, 6 is multiplied to the factorial of (6 - 1 = 5). For this, the number 5 is passed again to the factorial () function.
For More Information Please Refer: