Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
gcd with ruby
def mygcd(n, m)
return n if
mygcd(m, n % m)
puts mygcd(ARGV[0].to_i, ARGV[1].to_i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.