#include <stdio.h>

int main() 
{
    int i,n;
    int a=0,b=1;
    int fib;
    printf("Enter the number of terms:\n");
    scanf("%d",&n);
    printf("the first %d terms of the fibonoci series are: \n",n);
    for (i=0;i<=n;i++)
        {
            if (i<=1)
                fib =i;
            else
            {
                fib=a+b;
                a=b;
                b=fib;
            }
            printf("%d\n",fib);
        }
}

Embed on website

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