#include
int isSquare(int num);
main()
{
int num, temp;
printf("Enter the number\n");
scanf("%d", &num);
temp = 5 *(num * num) - 4;
if(isSquare(temp) || isSquare(temp+8)){
printf("It is finonacci number\n");
}else {
printf("It is NOT finonacci number\n");
}
}
int isSquare(int num)
{
int i=1;
while(num>0)
{
num = num - i;
i = i+2;
}
if(num==0)
return 1;
else
return 0;
}