What will be the output of the following pseudocode?
Integer fun(Integer n)
if (n < 2)
return n + 1
End if
return fun(n - 1) + fun(n - 2) + n
End function
Print fun(5)29
26
34
19
The verified answer and full solution are one login away
Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks this full mock in the real exam interface.
Log in to see the answer