#include <stdio.h>
int main() 
{
    int n1=0,n2=1,n3,i,n;
    scanf("%d",&n);
    printf("Enter the value of n=%d\n",n);
    printf("n1=0\nn2=1\n");
    printf("0\n1\n");
    for(i=2;i<=n;i++)
        {
        n3=n1+n2;
        printf("%d\n",n3);
        n1=n2;
        n2=n3;
        }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: