In this Turbo C programming tutorial I am going to show you guys how to find a factorial of a number using "for loop". The factorial of a positive integer n is equal to 1*2*3*4...n. You will learn to calculate the factorial of a number using for loop in this example.
The factorial of a positive number n is given by:
factorial of n (n!) = 1*2*3*4...n
The factorial of a negative number doesn't exist. And, the factorial of 0 is 1, 0! = 1
This will be the example output:
Enter an integer: 10
Factorial of 10: 3628800