TEOCO Interview Question

Implement factorial function recursively and with a loop.