Cognizant interview question

Create a factorial given a number