Cognizant Interview Question

write a code for factorial and fibonacci ?