IDZ Digital interview question

Fibonacci series related code .