Java Blog

 
 
 
 public class JAVA_031
 {

    public static void 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);
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to show the use of the Continue Statement