Skip to content

Instantly share code, notes, and snippets.

@viveksyngh
Created August 5, 2015 19:45
Show Gist options
  • Select an option

  • Save viveksyngh/fb0cf9cb12363863db3c to your computer and use it in GitHub Desktop.

Select an option

Save viveksyngh/fb0cf9cb12363863db3c to your computer and use it in GitHub Desktop.
Greatest Common Divisor (GCD) of two number
#Given 2 non negative integers m and n, find gcd(m, n)
def gcd(A, B):
while B != 0 :
A , B = B , A%B
return A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment