cpcdoy / Fibo

Compute the sum of the first n even fibonacci numbers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fibo

Compute the sum of the first n even fibonacci numbers

Usage:

Computes the first n even numbers from the fibonacci sequence using 2 methods and compares their results.

Usage: fibonacci n

Args: - n: number (n > 0) of even fibonacci numbers to compute

Example usage:

$ ./fibonacci 6
Testing both methods: loops vs no loops
0: 0 0
1: 2 2
2: 2 2
3: 10 10
4: 10 10
5: 10 10
6: 10 10
Results: Outputs match 100 %
This is due to precision loss when using our second "no loops" method

About

Compute the sum of the first n even fibonacci numbers


Languages

Language:C++ 89.8%Language:CMake 10.2%