0%
0 / 15 answered

Nested Iteration Practice Test

15 Questions
Question
1 / 15
Q1

A student prints coordinates for seats in a small theater using nested loops. Given the program below,


for (int r = 1; r <= 2; r++) {

  for (int c = 1; c <= 3; c++) {

    System.out.print("(" + r + "," + c + ")");

  }

}

What is the output of the following nested loop?

Question Navigator