Java Topic Practice
Nested Loops
Nested Loops MCQ Practice
Question 1 of 15
Answered 0 of 15
Choose one answer.
What is printed by the following code segment?
int count = 0;
for (int i = 1; i <= 5; i++) {
for (int j = i; j <= 5; j++) {
count++;
}
}
System.out.print(count);