#include <stdio.h>

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

Embed on website

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