fibonaci numbers

what's the simplest way of getting the sequence?


Comments

  • Try this...


    #include

    void main()

    {

    for(long a=0,b=1,i=0;i<20;i++,a+=b,b+=a)<br>
    cout<<a<<" "<<b<<" ";<br>
    }


    Good Luck!


    : what's the simplest way of getting the sequence?





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories