+91-85006-22255
What will be the output of the following program?
public class FactIs { public static void main(String[] args) { int number = 6; int fact = 1; while (number > 1) { fact *= number; number--; } System.out.println("Factorial for 6 is " + fact); }}
Topic: Factorial Program In Java Using While Loop
Read this topic
Open In App