累计从1加到100的和
sum100 = 0 counter = 1 while counter < 101: sum100 += counter counter += 1 print(sum100)
输出结果:
累计从1加到100的和
sum100 = 0 counter = 1 while counter < 101: sum100 += counter counter += 1 print(sum100)
输出结果:
转载于:https://www.cnblogs.com/hejianping/p/10861595.html