Question 47 of 65Pseudocodepseudocode nested loops

What will be the output of the following pseudocode?

Integer i, j, s
Set s = 0
for (each i from 1 to 4)
    for (each j from i to 4)
        s = s + i * j
    End for
End for
Print s

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 this full mock in the real exam interface.

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