continue求和
sum = 0
x = 0
n=0
while True:
x = x + 1
if x > 100:
break
elif x==1+2*n:
continue
sum=+x
n=+1
print (sum)
求奇数的和,错在哪?
sum = 0
x = 0
n=0
while True:
x = x + 1
if x > 100:
break
elif x==1+2*n:
continue
sum=+x
n=+1
print (sum)
求奇数的和,错在哪?
2018-12-08
举报