write a java program to print all even numbers from 20 to 30 using while loop.
Answers
Answered by
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
Math,
5 months ago
Computer Science,
5 months ago
English,
5 months ago
Math,
11 months ago
Chemistry,
11 months ago
Computer Science,
1 year ago