Computer Science, asked by Sakshi2821, 11 months ago

write a java program to print all even numbers from 20 to 30 using while loop.​

Answers

Answered by BushrajavediqbalKhan
2

Explanation:

public class WhileEven {

   public static void main(String[] args) {

       int i=0;

       System.out.println("Even numbers");

       while(i<=10)

       {

           int num=0;

           System.out.println(num);

           i+=1;

           num+=2;

       }

   }

}

Similar questions