# 4、额,来个小插曲,写程序求出1-100的累加和。1+2+3+4+5+.....+100。#1sum =0i = 1while i<=100: sum = sum + i i+=1 print(sum)
#2sum = 0for i in range (1,101): sum = sum+i print(sum)
posted on 2019-05-16 09:37 奥喵 阅读(74) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 奥喵 Powered by .NET 9.0 on Kubernetes