This repository contains a C++ program that compares the time it takes to calculate a set number of Fibonacci sequence values using different methods.
The program implements the following methods to calculate Fibonacci numbers:
- Recursive Method: A simple recursive approach.
- Iterative Method: An iterative approach using loops.
- Dynamic Programming Method: An optimized approach using memoization.
To compile and run the program, use the following commands:
gcc -o fibonacci fibonacci.c
./fibonacciThe program will output the time taken by each method to calculate the Fibonacci numbers.