Check here what I did. You have to return entered number not i Because you are checking Fibbinary Number on entered number.
So I stored entered number in another variable n so we can return the exact entered value. We also can't return number because it's decreasing each time in loop so finally it will be 0 which we don't want.
Alby I already shown the code above. There we are doing both things checking Fibbinary Number as well as converting in Decimal Number.
If we can check Fibbinary Number directly then why you are thinking to check converted binary number
After the conversion is there any way that the code checks the Converted [binary numbers] if it is a Fibbinary or not, rather than the Decimal?
If this will work
Where im going to put
Code i = num % 10
Where am i gonna put this?
Is it going to replace if((n&(n>>1))==0)
Is it going to replace conversion function [process]