#include<stdio.h>
void main()
{
    int i,n,f,f1,f2;
    printf("Enter Number of Fibonacci Values Needed : ");
    scanf("%d",&n);
    f=0;
    f1=1;
    f2=1;
    do
    {
        i++;
        printf("%d\n",f);
        f1=f2;
        f2=f;
        f=f1+f2;
    }
    while(i<=n+1);
}

 OUTPUT:

Enter Number of Fibonacci Values Needed : 10
0
1
1
2
3
5
8
13
21
34