Factorial Program in Java Using Loop and Recursion

Here you will get factorial program in java using loop and recursion.

What is Factorial?

We can find factorial of any number by repeatedly multiplying it with all the numbers below it which are greater than 0. For example factorial of 3 is 6 (1 x 2 x 3).

Factorial Program in Java Using Loop

Output

enter a number:
6
factorial = 720

Factorial Program in Java Using Recursion

Comment below if you have any doubts regarding java factorial program.

Leave a Comment

Your email address will not be published. Required fields are marked *