a = int(input('Please enter a number(1st < 2nd): ')) b = int(input('please enter another number(1st < 2nd): ')) if a == 0: print(a * b) elif b == 0: print(a * b) else: if (a % b == 0): print(b) while (a % b != 0): z = a % b x = b % z if x == 0: print(z) else: print(x) break
初级程序员
by: 云代码会员 发表于:2020-04-01 17:22:50 顶(2) | 踩(0) 回复
a % b 里面的% 起什么作啊?
网友回复
回复zlqwerty123 : 求a除b的余数
顶(2) 踩(1) 2020-10-22 14:22:32
zlqwerty123 : 求a除b的余数
顶(0) 踩(0) 2020-10-22 14:23:06
回复评论