wrote a program to find the factorial of a given number