5.Write a program that calculates the factorial of a given number (for example, factorial of 5 = 120).