#include<stdio.h>

int main() {
    int n;
    printf("enter n(n>2) : ");
    scanf("%d",&n);

    int fib[n];
    fib[0]=0;
    fib[1]=1;


    for(int i=2; i<n; i++){//1,2,3,
        fib[i]=fib[i-1]+fib[i-2];//important
        printf("%d \t ", fib[i]);
    }
    printf("\n");
    return 0;
}

Embed on website

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