Question PSC-FUNC-0043
MediumWhat does the following pseudocode print?
Function s(Integer n)
if (n == 0)
return 0
end if
return (n mod 10) + s(n / 10)
End Function
Print s(s(9875))
- A.
11
- B.
29
- C.
2
- D.
20
Sign up free to see the answer and a step-by-step explanation.