lucasgrocha / ruby-factorial

Please read the README.md, thank you!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ruby-factorial

This code returns the factorial of a number

To use that, you should require the file, see below:

require_relative "factorial"

Now you can use number.flong or number.fshort

.flong return a string value:

5.flong => "5 x 4 x 3 x 2 x 1 = 120"

.fshort return a integer value, only the result of the factorial:

5.fshort => 120

About

Please read the README.md, thank you!


Languages

Language:Ruby 100.0%