Skip to content

Updated Implementation of Fibonacci in C++#4115

Open
adevasia wants to merge 4 commits intoOpenGenus:masterfrom
adevasia:master
Open

Updated Implementation of Fibonacci in C++#4115
adevasia wants to merge 4 commits intoOpenGenus:masterfrom
adevasia:master

Conversation

@adevasia
Copy link

@adevasia adevasia commented Aug 6, 2019

Changes:
Added a upper limit check
Put namespace into the function
Renamed functions and variables to useful names
Changed array to vector
Made changes to documentation to follow the Style Guide


int get_fib(int num)
{
using namespace std;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to keep namespace in individual functions?
Instead I would suggest you to keep it global.

Copy link

@ellial ellial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks okay. However I don't understand why you choose numbers below 46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants