Cognizant interview question

write few sample codes, including fibonacci series.