Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show the use of Nested Loops

Posted By: Bluma Fischer     Category: Java     Views: 11699

A Java Program to show the use of Nested Loops.

Code for Program to show the use of Nested Loops in Java

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);
       }
    }
 }
  
Share: 


Didn't find what you were looking for? Find more on Program to show the use of Nested Loops Or get search suggestion and latest updates.

Bluma Fischer
Bluma Fischer author of Program to show the use of Nested Loops is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!