// Modules open System // Recursive definition of Fibonacci numbers let rec fib n = match n with | 0 -> 0 | 1 -> 1 | _ -> fib (n-1) + fib (n-2) // Read from stdin and print result printfn "Inserisci l'indice del numero di fibonacci che vuoi calcolare:\n" let i = Console.ReadLine() |> int printfn "%A" (fib (i))