Iterative_factorial

Abd Elrahman Telb · @abdoutelb · almost 3 years

Take a number and return the its factorial in Iterative way.

def iterative_factorial(n)
(1..n).inject(:*)
end
3 · 0 · 0