You are viewing a single comment's thread. Return to all comments →
def factorial(n, i) yield(n, i) end n = gets.to_i i = n - 1 puts factorial(n, i) { while i != 0 n = n * i i -= 1 end n }
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 →