Question PSC-FUNC-0075
HardWhat will be printed by the following pseudocode?
Function count(Integer n, Integer maxPart)
if (n == 0) return 1 end if
if (n < 0 or maxPart == 0) return 0 end if
return count(n - maxPart, maxPart) + count(n, maxPart - 1)
End Function
Print count(7, 7)
- A.
13
- B.
7
- C.
Sign up free to see the answer and a step-by-step explanation.