JAVA Factorial
For Example:-
Note:- Factorial of zero is 1 (i.e. 0! = 1).
Output of Program:-
Factorial is a mathematical operation Factorial of a positive number n is denoted by n! and defined as the product of all numbers from 1 to the n. The syntax of factorial of number n is:
n! = n*(n-1)*(n-2)*(n-3)......2*1 |
For Example:-
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040 |
Note:- Factorial of zero is 1 (i.e. 0! = 1).
import java.util.Scanner; public class Factorial { |
Output of Program:-
How did you embed your java applets on Blogger?
ReplyDelete