How to write flowchart for whether a given number is a part of fibonacci series or not.
FLOWCHART of FIBONACCI SERIES
you can check this if this helps you:
First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 141, …
You know that in fibonacci series…0th index number is 0 and 1st index number is 1.
After that, you can get the value at 2nd index as: value at 0th index+ value at 1st index
Similary value at 3rd index is: value at 1st index+ value at second index.
So we can conclude with a formula:
Value at ith index= value at (i-1)th index + value at (i-2)th index. (where i>=2)
So to check if the given number is in the fibonacci series or not run this iteration till condition:
while(value at ith index <= given number )
So if this series ends with the given number, you can say that the number belongs to fibonacci series.
Else you can say that it in not in the fibonacci series.