public class Demo { public static void main(String[] args){ int x; for(x=1;x<=20;x++) { if(x%2==0) { System.out.println(x); } } } }
2 4 6 8 10 12 14 16 18 20
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Write a Java program to print the odd numbers from 1 to 20
Write a Java program to convert seconds to hour, minute and seconds
Write a Java program to check if a positive number is a palindrome or not
Write a Java program to count the number of even and odd elements in a given array
Write a Java program to check whether Java is installed on your computer or not