Writing a Fibonacci series

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • walidomar87
    New Member
    • Jul 2007
    • 3

    Writing a Fibonacci series

    i need an equation to solve this :
    1+1+2+3+5+8+13+ 21+34.......... .and so on
    the firs to are the sum of the 3rd and the secound and the 3rd are the sum of the forth and so on
    if u have the answer plz contact me
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by walidomar87
    i need an equation to solve this :
    1+1+2+3+5+8+13+ 21+34.......... .and so on
    the firs to are the sum of the 3rd and the secound and the 3rd are the sum of the forth and so on
    if u have the answer plz contact me
    That is the classic Fibonacci series: f(n) = f(n-1)+f(n-2); f(0)=f(1)=1. Google for
    it and you'll find zillion solutions for it, either recursive or iterative or even in
    closed form. Best of luck.

    kind regards,

    Jos

    Comment

    • walidomar87
      New Member
      • Jul 2007
      • 3

      #3
      can u give me the code of it

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by walidomar87
        can u give me the code of it
        No, we don't hand out code in TSDN; we're very willing to help you to do your
        own homework. Give it a try.

        kind regards,

        Jos

        Comment

        Working...