Computer Science, asked by priyabratadhar96, 5 months ago

write a program in Java to print all even number between 100 & 0 in reverse orders​

Answers

Answered by ssgalowal
0

Answer:

NEXT TIME GIVE MORE POINTS FOR LONG ANSWERS.

Explanation:

class JavaExample {

public static void main(String args[]) {

int n = 100;

System.out.print("Even Numbers from 1 to "+n+" are: ");

for (int i = 1; i <= n; i++) {

//if number%2 == 0 it means its an even number

if (i % 2 == 0) {

System.out.print(i + " ");

}

}

}

Similar questions