This question already has an answer here:
def gcd(a,b):
while a%b != 0:
a = b
a %= b
while a%b == 0:
c = a/b
print "The greatest common divisor of the two number is: %i" % c
x = raw_input("Enter the first number: ")
y = raw_input("Enter the second number: ")
gcd(x,y)
I tried running this code but it keep giving me this error:
TypeError: not all arguments converted during string formatting
Aucun commentaire:
Enregistrer un commentaire