Cognizant interview question

Basics coding questions like Fibonacci number.