for(i=1 ; i<= 5; i++) {
for (j=1; j<=5 ; j++) {
System.out.println(); }}
Q3. How many times the inner loop (j) will be executed?
Answers
Answered by
2
Answer:
For first iteration of outer loop j is in range [0, 1] so inner loop executes twice. For second iteration of outer loop j is in range [0, 1, 2] so inner loop executes 3 times. This makes the total number of loop executions as 2 + 3 = 5.
Similar questions
Math,
8 days ago
Math,
8 days ago
Math,
16 days ago
CBSE BOARD XII,
16 days ago
Science,
9 months ago
India Languages,
9 months ago