Cognizant Interview Question

To write a simple program like factorial in any programming language of my choice