Write a program that displays first n Fibonacci numbers.

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

void main()
{
    int i,n;
    long a[1000];
    clrscr();
    printf("How many numbers : ");
    scanf("%d",&n);
   
    a[0]=0;
    a[1]=1;
    for(i=2;i<n;i++)
       a[i]=a[i-1]+a[i-2];

    for(i=0;i<n;i++)
       printf("\n\na[%d] = %ld",i+1,a[i]);
    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........