No description
Find a file
2024-10-07 12:06:03 +02:00
code_explanation.pdf initial commit 2024-10-07 12:06:03 +02:00
code_explanation.tex initial commit 2024-10-07 12:06:03 +02:00
fibonacci_sum.c initial commit 2024-10-07 12:06:03 +02:00
fibonacci_sum.py initial commit 2024-10-07 12:06:03 +02:00
README.md initial commit 2024-10-07 12:06:03 +02:00

DECODE DEMCODE CHALLENGE #1

Description

A solution for the Decode Demcon Challenge #1 - Even Fibonacci numbers: adding all Fibonacci numbers that are even up to a certain number.

Since the reason why this code works might not be very intuitive, there is an explanation about the math.

Running the project

C

Compile the C code with

gcc -O3 fibonacci_sum.c -o fibonacci_sum

run the code with

./fibonacci_sum

Python

For fun, the Python version is code golfed.

To execute simply run

python fibonacci_sum.py

Building the PDF

xelatex code_explanation.tex