dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
1
share rss forum feed


cdru
Go Colts
Premium,MVM
join:2003-05-14
Fort Wayne, IN
kudos:7
reply to cplusnoob

Re: Please help me understand this function

You're code was mangled. Be sure to place all your code between [code ] [/code ] brackets, minus the spaces.

The function that you look like you will have will compute a Fibonacci number. It's value is given by F(n) = F(n-1) + F(n-2) with seed values F(0) = 0 and F(1) = 1. F(n-1) and F(n-2) are recursively called and then the sums are added up.