program that gives the factorial solution to a number