0
Modify the previous program such that only multiples of three or five are considered in the sum, e.g.. 3,5,6,9,10,12,15 for n.
2 Answers
+ 2
well you need a cycle to go through your numbers, and inside a cycle use if method and check if number%3==0 || number number%5==0
0
Please follow this guide on how we post a question. Also mind to use the tags properly
https://www.sololearn.com/Discuss/333866/?ref=app
https://code.sololearn.com/W3uiji9X28C1/?ref=app