Fibonacci Series

Program to print Fibonacci Series :

ALGORITHM:

    1. [INITIALISE]
      SET a=0
      SET b=1
    2. Input the no. of terms in fibonacci series, say, n
    3. PRINT first two terms i.e 0,1
    4. for i=0  to i=(n-2)
      SET c=a+b
      PRINT c
      [UPDATE]  a=b  and b=c
      [end of for loop]
    5. EXIT

C SOURCE CODE:

Leave a Reply

Your email address will not be published. Required fields are marked *