m = int(input("First number (0 to stop): "))
n = int(input("Second number: "))
def gcd(a, b):
while b != 0:
c = a % b
a = b
b = c
if b == 0:
break
return a
print ("The greatest common divisor of", n,"and", m, "is", abs(gcd(m,n)))
当 m 等于 0 时,如何跳出这个 while 循环。