Question PSC-ARR-0048
MediumWhat will be the output of the following pseudocode?
Integer a[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
Integer i, j, s = 0
for (each i from 0 to 2)
for (each j from 0 to 2)
if (i > j)
s = s + a[i][j]
end if
end for
end for
Print s
- A.
19
- B.
11
- C.
Sign up free to see the answer and a step-by-step explanation.