标签:temp while nbsp int ... print lse bsp ==
n = 1s = 0while n < 100: temp = n % 2 if temp == 0: s = s - n else: s = s + n n = n + 1print(s)
1-2+3-4...+99
原文地址:https://www.cnblogs.com/wangzhiy/p/10207404.html