Write a java program to find the factorial of a given integer number code example
Example: factorial number in java
int num1 = 6;
int num2 = 1;
for(int a = 1; a<=num1; a++) {
num2 = num2 * a;
}
System.out.println(num2);
int num1 = 6;
int num2 = 1;
for(int a = 1; a<=num1; a++) {
num2 = num2 * a;
}
System.out.println(num2);