Question PSC-FUNC-0049
MediumWhat will be the output of the following pseudocode?
Function ack(Integer m, Integer n)
if (m == 0)
return n + 1
end if
if (n == 0)
return ack(m - 1, 1)
end if
return ack(m - 1, ack(m, n - 1))
End Function
Print ack(2, 2)
- A.
5
- B.
7
- C.
Sign up free to see the answer and a step-by-step explanation.