diff --git a/Algorithms/Math/Fibonacci.fs b/Algorithms/Math/Fibonacci.fs index 1fb284a..58f2e2e 100644 --- a/Algorithms/Math/Fibonacci.fs +++ b/Algorithms/Math/Fibonacci.fs @@ -4,4 +4,10 @@ module Fibonacci = let rec PrintSerie (one: int) (two: int) = let fibo = one + two System.Console.WriteLine fibo - PrintSerie two fibo \ No newline at end of file + PrintSerie two fibo + + let rec NthFibonacci (n: int): int = + match n with + | 0 -> 0 + | 1 -> 1 + | n -> NthFibonacci (n-1) + NthFibonacci (n-2)