Write a program that read a number & test Fibonacci or not Fibonacci.

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

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

    a=0;
    b=1;
    for(i=1;a<n;i++)
    {
       c=a+b;
       a=b;
       b=c;
    }

    if(a==n)
       printf("Fibonacci");
    else
       printf("Not Fibonacci");

    getch();
}

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