作者在 2020-12-25 16:01:10 发布以下内容
print("计算 100以内偶数的和的结果为:")
#保存累加结果的变量
result = 0
for i in range(1,10):
for n in range(1,i+1):
result = i * n
print("%s*%s=%s"%(n,i,result),end =" ")
print("")
#保存累加结果的变量
result = 0
for i in range(1,10):
for n in range(1,i+1):
result = i * n
print("%s*%s=%s"%(n,i,result),end =" ")
print("")