Ruby code to find the Factorial of a given number

number = 5; # Change the number here fact = 1; (1..number).each do |i| fact = fact*i; end print "Factorial of ", number ," is: ", fact

Factorial of 5 is: 120

## Comments :