A Java Program to show the use of Nested Loops.
publicclass JAVA_030 { publicstaticvoid main(String[] args) { long limit=20; long factorial=1; for(int i=1;i<=limit;i++) { factorial=1; for(int j=2;j<=i;j++) factorial*=j; System.out.println("Factorial of " + i + " = " + i + "! = " + factorial); } } }