Fibonacci Series starts with 1 and 1, and continues by adding the last 2 numbers to find the next number. (i.e. “1, 1, 2, 3, 5, 8, 13, 21…”)
Send us a single RECURSIVE function that takes any integer n as input and…
a) If n is in the Fibonacci Series, returns the order of n in the series,
OR
b) if n is not in the Fibonacci Series, returns the count of Fibonacci numbers smaller than n.
Examples:
n=3 output should be 4 (1, 1, 2, 3)
n=4 output should be 4 (1, 1, 2, 3 <4 )