Help with the homework problem

I cant figure out the the code for identifying a particluar fibonaaci nuber to check,how do i check each fibonacci number

You just need to maintain 2 variables, a=0, b=1, and then you will calculate s=a+b, since fibonacci series is generated based on the concept that the current no is the sum of previous two numbers, so at an point if the value of a==no then it is fibo no, otherwise not