发布网友 发布时间:2022-04-23 02:11
共1个回答
热心网友 时间:2022-04-18 21:11
def getSum(start, end):
sum = 0
for i in range(start, end + 1):
if i % 15 == 0:
sum = sum + i
return sum
start_1 = 1
end_1 = 30
sum_1 = getSum(start_1, end_1)
print(sum_1)
start_2 = 40
end_2 = 90
sum_2 = getSum(start_2, end_2)
print(sum_2)
源码:
链接:https://pan.baidu.com/s/1_YXhErMq9RC6XA8AIfXvnw
提取码:x304