求1-2+3-4+5 ... 99的所有数的和 a=1 b=0 while a<101: if a%2==1: b=a+b a=a+1 c=1 d=0 while c<101: if c%2==0: d=d-c c=c+1 print(b+d)