Question PSC-FUNC-0073
HardWhat does the following pseudocode print?
Function f(Integer n)
if (n == 0) return 1 end if
return n * f(n - 1)
End Function
Function zeros(Integer n)
Integer c = 0, k = 5
while (k <= n)
c = c + n / k
k = k * 5
end while
return c
End Function
Print f(10) mod 1000, zeros(10)
- A.
800 2
- B.
800 1
- C.
Sign up free to see the answer and a step-by-step explanation.