You are viewing a single comment's thread. Return to all comments →
for F#
here is my solution:
let rec getFib(n:int) = if n < 4 then 1 else getFib (n - 1) + getFib (n - 2) let main = let n = System.Console.ReadLine() |> int let ret = getFib(n) printfn "%d" ret
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
for F#
here is my solution: