Hello,
I am having trouble with a for loop that refuses to stop. i created it to generate the fibonacci problems less that 4 million for project euler, but it goes well beyond that parameter. anything helps. Thanks.
If n is 3,999,999, you're going to return the sum of fib(3,999,998) and fib(2,999,997). Since fib() is recursive, each of those calls will do the same thing.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.