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...
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement