Skip to content

Instantly share code, notes, and snippets.

@devils-ey3
Created September 26, 2016 19:58
Show Gist options
  • Select an option

  • Save devils-ey3/bf2fc09cbd0a829f986dce924981e684 to your computer and use it in GitHub Desktop.

Select an option

Save devils-ey3/bf2fc09cbd0a829f986dce924981e684 to your computer and use it in GitHub Desktop.
The greatest common divisor of two positive integers is the largest integer that divides each of them without remainder
def gcdRecur(a,b):
if a>b:
a,b=b,a
if a==0:
return b
else:
return gcdRecur(b%a,a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment