Skip to content

Instantly share code, notes, and snippets.

@ebovio
Created April 16, 2017 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebovio/90175db6ec542f09f840f1ce23b6ad29 to your computer and use it in GitHub Desktop.
Save ebovio/90175db6ec542f09f840f1ce23b6ad29 to your computer and use it in GitHub Desktop.
#Problem10
def gcd(x, y):
reminder = 0
while y > 0:
reminder = y
y = x % y
x = reminder
return x
#Main program below
num1=int(input("Write the first number"))
num2=int(input("Write the first number"))
print ("The greatest common divisor of", num1, "and", num2, "is", gcd(num1, num2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment