Infosys interview question

Fibonacci Series question and multiple ways to do it.