Solution of the assignment problem

Given a Number N check if it part of Fibonacci Series or Not?

hello @harshita.rathee

A simple way is to generate Fibonacci numbers until the generated number is greater than or equal to ‘n’ .

or

you can take help of this property
A number is Fibonacci if and only if one or both of (5*n^2 + 4) or (5*n^2 – 4) is a perfect square.

image

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.