Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show the use of the Continue Statement

Posted By: Jarvinia Miller     Category: Java     Views: 1569

A Java Program to show the use of the Continue Statement.

Code for Program to show the use of the Continue Statement in Java

publicclass JAVA_031
 {

    publicstaticvoid main(String[] args)
    {
       int limit=20;
       int sum=0;

       for(int i=1;i<=limit;i++)
       {
          if((i%3)==0)
            continue;

          sum+=i;
       }

       System.out.println("Sum of first 20 integers with skipped integers divisible by 3 = " + sum);
    }
 }
  
Share: 


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

Jarvinia Miller
Jarvinia Miller author of Program to show the use of the Continue Statement 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!