Yeah, it generates numbers from the Fibonacci series.
( I really shoulda got that one first! hehehe.. ahh well. nevermind )
~Cobra~
C++ Recursion Quiz : Some Light Relief...
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
quote: Original post by abrunyee
Just being picky, here. I''ve not tried compiling it, but wouldn''t it fail as not all control paths actually return a value?
E.g. If you called dosomething(-2)...
You''d get stuck in an infinite loop, for sure, but it would still compile. dosomething(-2) _does_ have a return value, it''s doSomething(-3) + doSomething(-4).
anyway my point is that it would _not_ fail to compile.
/riley
--Riley
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement