Explaination : In this program, we accept a positive integer from the user of whom we are going to find the factorial. The integer number is then passed in the User-defined Function named "fact". The condition is like, if the number gets equal to zero, then the it will return 1 or else it will return number times the fact of (n-1) i.e the function is calls itself. So, again the function "fact" will run for (n-1) and then like this goes on and on until the n values get 0 and it finally returns the value 1 so the functions terminates and returns that value to the main function.