You are viewing a single comment's thread. Return to all comments →
def factorial(n) yield(n) end n = gets.to_i puts factorial(n) { (1..n).reduce(1, :*) }
Seems like cookies are disabled on this browser, please enable them to open this website
Blocks
You are viewing a single comment's thread. Return to all comments →