Find the factorial of a given number
- Factorial of 'n' is the product of all positive descending integers.
- Example: 5! = 5 * 4 * 3 * 2 * 1 = 120
- Can be achieved in two ways:
- Through the loop
- Through the recursive method
- Make sure JDK is installed
- Download the program, assuming you have downloaded the recursive method, and you have the directory opened in CLI, type:
- javac FactorialNumber.java
- java FactorialNumber
- Follow the instructions