lundi 18 juillet 2016

Type error: "Not all arguments converted during string formatting" [duplicate]

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