public class Main {
public static void main(String[] args) {
int[] array = new int[100];
for (int i = 0; i < array.length; i++) {
array[i] = i + 1;
if (array[i] % 2 == 0) {
System.out.println(array[i]);
}
}
}
}
for(int i =0;i<array.length;i++){
array[i]=i+1;
if (i%2==0){
System.out.println(array[i]);
}
1
3
5
7