by enrico-sorichetti » Thu Jul 01, 2010 8:18 pm
for the fibonacci series a truly recursive implementation would be
unsigned int fib(unsigned int n)
{
return n < 2 ? n : fib(n-1) + fib(n-2);
}
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort