NTT DATA interview question

Write a program to find factorial.