Commit 9d2f7ad7 by BellCodeEditor

auto save

parent eb2dbbaa
Showing with 17 additions and 0 deletions
count=1
while count<10:
print(count)
count+=1
\ No newline at end of file
#使用while循环实现输出2-3+4-5+6...+100的结果
i=2
sum=0
while i<=100:
if i%2==0:
sum+=i
else:
sum-=i
i+=1
print("sum:",sum)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment