You are viewing a single comment's thread. Return to all comments →
def factorial yield end n = gets.to_i factorial do puts (1..n).reduce(:*) end
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 →