Question PSC-FUNC-0064
HardWhat is the output of this pseudocode?
Function c(Integer n)
if (n == 1)
return 0
end if
if (n mod 2 == 0)
return 1 + c(n / 2)
end if
return 1 + c(3 * n + 1)
End Function
Print c(27) > 100, c(6)
- A.
true 6
- B.
false 8
- C.
Sign up free to see the answer and a step-by-step explanation.