Iterative_factorial

Abd Elrahman Telb · @abdoutelb · about 4 years

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

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