Java Program – to find the factorial of a number using for loop.

Output: