write a basic program to print all the even numbers between 5 and 95 in reverse order
Answers
Answered by
1
Answer:
class evenprint{
public static void main() {
for(int i = 94; i >= 6; i -= 2) { //for loop iterates from 94 to 6!
System.out.println(i);
} //end of for loop
} //end of main() method
} //end of class evenprint
It prints:
94
92
90
88...
10
8
6
Hope this helps! If it does, feel free to mark it brainliest! Thanks :D
Similar questions
Environmental Sciences,
5 months ago
Math,
5 months ago
Environmental Sciences,
9 months ago
English,
9 months ago
Math,
1 year ago
English,
1 year ago