#include<stdio.h>
#include<math.h>

int main()
{
    int n,a=0,b=1;
    int fib=0,i;

    printf("Enter the number of terms:\n ");
    scanf("%d",&n);
    do
        {
            printf("\n%d",a);
            i++;
            fib=a+b;
            a=b;
            b=fib;
            
        }
    while(i<=n);
}

Embed on website

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