| preferred AP College board partner for AP classes
AP Computer Science A/Unit 10: Recursion
Start Practice TestPractice Test
About Exam
easy Solved by 5 students
Nested For Loop Iteration Count
< Prev
Next >

How many times will the println statement be executed by the following code segment?

for (int i = 1; i <= 3; i++) {
    for (int j = i; j <= 5; j++) {
        System.out.println(i + "-" + j);
    }
}
A

12

B

10

C

11

D

9

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1singhris00011 0m 49s 51
#2namansoin00011 1m 01s 39
#3bommasam00036 4m 09s 21
#4chasequest801 0m 03s -13
#5richa.tuli01 0m 25s -35
Items per page:
10
1 – 5 of 5
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy