Write a program that print all Fibonacci numbers from 1 to n.

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

void main()
{
    long a,b,c;
    int n,i;
    clrscr();
    printf("Enter how many numbers, n = ");
    scanf("%d",&n);

    a=0;
    b=1;
    for(i=1;i<=n;i++)
    {
       printf("%10ld",a);
       c=a+b;
       a=b;
       b=c;
    }

    getch();
}

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