Cognizant interview question

Asked to program a Fibonacci sequence