Infosys interview question

Find factorial of a number and write code.