fibonacci series c#


  • i need code for fibonacci series of numbers... but it should calculate for only five step... which means the output should be

    0 1 1 2 3  

    tats it...

    pls help me...

    Saturday, February 12, 2011 12:23 PM


  • int oldn=0;

    int newno=1;

    int fno;

    int j=0;

    for(; ;)












    easiest method made for you by me.

    Saturday, February 12, 2011 12:43 PM
  • Hi,

    I have some problems to understand your problem. Can you please help a little more? My answer at the moment would be:

    Console.Write("0 1 1 2 3");

    which writes a list of the first 5 fibonacci numbers - as you requested.

    Sorry, at the moment I have simply the feeling that this is a question like "Please do my homework". At least I will not write complete solutions in such cases. Target of a homework is, that you learn something. So please tell me, where you have a problem?

    - Do you need information about the fibonacci series?

    - Do you need to know how to write a program? Or you miss software? could be a good start.

    - Do you need information about methods or loops? Or maybe you want to learn about recursion?

    Just tell us, what your problem really is and we will try to help you.

    With kind regards,



    Saturday, February 12, 2011 12:43 PM
  • There is an example of Fibonacci at this link.

    Rudy   =8^D

    Mark the best replies as answers. "Fooling computers since 1971."

    Saturday, February 12, 2011 3:28 PM

All replies