How can you use loops to calculate factorial?

Visit this page to learn, how you can use loops to calculate factorial. 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 More Information Please Refer:

You May Also Like to Read: