Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Created December 20, 2012 03:41
Show Gist options
  • Save ayato-p/4342767 to your computer and use it in GitHub Desktop.
Save ayato-p/4342767 to your computer and use it in GitHub Desktop.
def greatest_common_divisor(n, m)
return n if m.zero?
greatest_common_divisor(m, n%m)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment