# n = int(input("请输入一个整数:")) # 5 # s = 0 # 存储所有数的和 # i = 1 # 控制循环条件 # while i <= n: # s = s + i # i = i + 1 2、写程序求 1/1 + 1/3 + 1/5 + ... + 1/99 # s = 0 # i = 1 # while i <= 99: # s += 1/i # i += 2 ...