Compute the factorial of an integer both iteratively and recursively