Question 49 of 65Pseudocodepseudocode nested loops

What will be the output of the following pseudocode?

Integer i, j, c
Set c = 0
for (each i from 1 to 4)
    for (each j from 1 to 6)
        if (j == i)
            continue
        End if
        c = c + 1
        if (j > i + 2)
            break
        End if
    End for
End for
Print c

The verified answer and full solution are one login away

Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.

Log in to see the answer
← Q48Q50 →Attempt the full timed mock