为什么先求余数 会错啊
这样写为什么错啊,求解惑:
求1到100奇数和:
sum = 0
x = 1
while True:
if x % 2 == 0:
continue
sum = sum + x
if x > 100:
break
x = x + 1
print (sum)
这样写为什么错啊,求解惑:
求1到100奇数和:
sum = 0
x = 1
while True:
if x % 2 == 0:
continue
sum = sum + x
if x > 100:
break
x = x + 1
print (sum)
2016-12-10
举报