Created
April 16, 2017 19:29
-
-
Save ebovio/90175db6ec542f09f840f1ce23b6ad29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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