为什么我打出来的代码答案与答案不符
sum = 0x = 0while True: sum = sum + x x = x + 1 if x > 100: break if x % 2 == 0: continueprint sum
原来代码的答案时是2500,我这个打出来的答案时5050
sum = 0x = 0while True: sum = sum + x x = x + 1 if x > 100: break if x % 2 == 0: continueprint sum
原来代码的答案时是2500,我这个打出来的答案时5050
2020-04-08
举报