As you can see, this is a relatively simple start. This is a pretty common introductory programming problem to introduce recursion, after all.

Unfortunately, there's a reason I only show Fibonacci number 30 instead of ten billion. This is pretty fast up until around 30 on my machine (which takes only a second to compute), but then it slows down dramatically. F100F_{100} would take a very, very long time using this method, longer than my computer can easily handle. Let's see why by looking deeper into this algorithm.

Code
Output
832040

As you can see, this is a relatively simple start. This is a pretty common introductory programming problem to introduce recursion, after all.

Unfortunately, there's a reason I only show Fibonacci number 30 instead of ten billion. This is pretty fast up until around 30 on my machine (which takes only a second to compute), but then it slows down dramatically. F100F_{100} would take a very, very long time using this method, longer than my computer can easily handle. Let's see why by looking deeper into this algorithm.

Code
Output
832040