Question PSC-COND-0074
HardWhat is the output of this pseudocode?
Integer n = 12, s = 0, d
for (each d from 1 to n - 1)
if (n mod d == 0)
s = s + d
end if
end for
if (s == n)
Print "perfect"
else if (s > n)
Print "abundant"
else
Print "deficient"
end if
- A.
perfect
- B.
abundant
- C.
Sign up free to see the answer and a step-by-step explanation.