Search C Program | nimishsoft@gmail.com

Fibonacci series using for loop

/* Fibonacci series using for loop */
// 0 1 1 2 3 5 8 13...

#include<stdio.h>
int main()
{
    int n,i,a,b,c;
    printf("Enter a number: ");
    scanf("%d",&n);
    a=0;
    b=1;
    for(i=1;i<=n;i++)
    {
        printf("%d ",a);
        c = a + b;
        a = b;
        b = c;
    }
    return 0;
}

Related Post:
Fibonacci Series using while loop
http://cbasicprogram.blogspot.in/2012/03/fibonacci-series-using-while-loop.html

2 comments:

  1. Attention everyone, the file provided above is not working. I have been looking for the working file and finally found it.



    ✔️Click Here To Download http://gestyy.com/e0GAyS
    ✔️Click Here To Download

    ✔️Click Here To Download http://exe.io/XONVsO6l

    ✔️Click Here To Download


    ✔️Click Here To Download
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .

    .

    .
    .

    .

    .
    .
    .
    .

    Mn.
    ..

    .
    .
    .
    ..
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    ..
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .zxxzxz
    .sdcccxxx

    ReplyDelete
  2. Nice post!!!!!!!! I Liked your post, thanks for sharing such a good post with us.
    Fibonacci series in C

    ReplyDelete