WAP in Java which finds the factorial of a given number.
Plzz.... answer me fast.....
Answers
Answered by
3
Answer:
Factorial Program using loop in java
class FactorialExample{
public static void main(String args[]){
int i,fact=1;
int number=5;//It is the number to calculate factorial.
for(i=1;i<=number;i++){
fact=fact*i;
}
System.out.println("Factorial of "+number+" is: "+fact);
Similar questions
Hindi,
3 months ago
Math,
3 months ago
India Languages,
3 months ago
Hindi,
7 months ago
English,
7 months ago
CBSE BOARD XII,
11 months ago