Using recursive and iterative algorithm to calculate the factorial of n, that is, n!.