Pure Programmer
Blue Matrix


Cluster Map

Project: Fibonacci Numbers

You can compute numbers in the [[Fibonacci_number|Fibonacci Sequence]] easily using function recursion. The Fibonacci Sequence is specified by the recurrence relation...

`F_n = F_n-1 + F_n-2` for n > 1
with `F_0` = 1 and `F_1` = 1

Write a [[Recursion_(computer_science)|recursive function] to compute Fibonacci numbers given n. Write a main program to test the function.

Output
$ swiftc Fibonacci1.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution