Question PSC-ARR-0037
EasyWhat will be the output of the following pseudocode?
Integer a[] = {12, 5, 20, 9}
Integer mx = a[0], mn = a[0]
for (each i from 1 to 3)
if (a[i] > mx)
mx = a[i]
end if
if (a[i] < mn)
mn = a[i]
end if
end for
Print mx - mn
- A.
25
- B.
8
- C.
Sign up free to see the answer and a step-by-step explanation.