0

i must write a program that reads a number between 1 and 100 then calls a function to check if the number is part of the Fibonacci series.the main should display if the number is part of thr Fibonacci series.thanks

#include<iostream.h>

#include<conio.h>

int check_fib(int a)

{char ans1,ans2,ans;

int sum,x,i;

sum=0;

x=100;

ans1='y'

ans2='n'

for(i=0;i<=x;i++)

{

sum=sum+x;

if(sum==a)

ans=ans1;

break;

else

ans=ans2;

continue

}

return(ans);

}

void main()

{

clrscr();

int x,z;

cout<<"enter an integer";

cin>>x;

z=check_fib(x);

cout<<"the number is part if the fibonacci series"<<z<<endl;

}