Complete code:
import java.util.*;
public class Main {
public static void main(String[] args) {
int i = 10;
do {
for (int j = i / 2; j > 0; j--) {
System.out.print(j + " ");
}
System.out.println(); // For a new line after each loop iteration
i -= 2;
} while (i > 0);
}
}
Output:
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
This section is not available anymore. Please use the main Exam Page.1z0-819 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
alphapr
5 months agod7bb0b2
1 year agokvarpe
1 year, 2 months agojames2033
1 year, 2 months agocuriouss
1 year, 4 months agocuriouss
1 year, 4 months agoqulyt
1 year, 5 months agoLebannin
1 year, 5 months agomuzire
1 year, 5 months agoMtandwa
1 year, 6 months agoStavok
1 year, 7 months agotyfah
1 year, 7 months agobharathdave
1 year, 8 months agoArvind_Kumar_Avinash
1 year, 8 months agokavithaprasanth
1 year, 9 months agoAnotherJavaGuy
1 year, 10 months agoGuru_01
1 year, 11 months ago