官术网_书友最值得收藏!

10. Sums of multiples

Write a program that calculates the sums of multiples of 3 or 5 between zero and a given maximum value. For example, if the maximum is 30, then the program should calculate 3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 + 20 + 21 + 24 + 25 + 27 + 30 = 225 because those are the multiples of 3 and 5.

主站蜘蛛池模板: 汽车| 上虞市| 门头沟区| 施甸县| 鲁山县| 祥云县| 拉孜县| 南郑县| 浦城县| 合肥市| 木兰县| 嘉鱼县| 江都市| 肥西县| 大足县| 南岸区| 保德县| 大城县| 资源县| 阳曲县| 德保县| 天门市| 高邑县| 宝兴县| 沈丘县| 兰州市| 台前县| 华宁县| 武山县| 京山县| 乐都县| 阿鲁科尔沁旗| 疏勒县| 锦州市| 宿州市| 喀喇沁旗| 武平县| 闽侯县| 思茅市| 三穗县| 枣庄市|