求最大公约数伪代码
1.以除数和余数反复做除法运算,当余数为 0 时,取当前算式除数为最大公约数。
https://baike.baidu.com/item/%E6%AC%A7%E5%87%A0%E9%87%8C%E5%BE%97%E7%AE%97%E6%B3%95/1647675
2.input a,b
while a < b
temp = a
a = b
b = temp
if b = 0
print a
else
c = a % b
while c != 0
a = b
b = c
print b
3.