Cognizant interview question

write a code for factorial by taking input from user, use recursion.