Factorial

[Factorial - Wikipedia]((http://en.wikipedia.org/wiki/Factorial)

From Wikipedia:

In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n.

For example, the factorial of 5 is 120 or (5 * 4 * 3 * 2 * 1).

Instructions

Write a ruby program that calculates the factorial of a given number.

Example

factorial(3)
=> 6

factorial(4)
=> 24

factorial(5)
=> 120