Question PSC-FUNC-0009
MediumWhat will be the output of the following pseudocode?
Function g(Integer n)
if (n <= 0)
return 0
end if
return n + g(n - 2)
End Function
Print g(9)
- A.
45
- B.
20
- C.
Sign up free to see the answer and a step-by-step explanation.