JAVA PROGRAM TO PRINT THE SEQUENCE 2,4,8,6 USING FOR LOOP


Couch ModePrint

/**WAP TO PRINT THE SEQUENCE 2,4,8,6... USING FOR LOOP*/

public class ListEvenNumbers
 {
        public static void main(String args[])
 {          
                int limit = 50;
                for(int i=1; i <= limit; i++;
{              
                        if( i % 2 == 0)
{
                                System.out.print(i + " ");                     
 }
 }
 }
 }

Thank Your Valuable Comment Tool to Insert codes in Comments : Convert My Code. Hide

Select to parse the code (not required if code is already parsed):

Subscribe By Email

Join Our Newsletter

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!

We Respect Your Privacy

Popular Posts