Answers for "returns the sum of all the multiples of 3 and 5 from 1 to 1000"

1

sum of all multiples of 3 and 5 below 100

c = list(range(1,100))

total = 0

for i in (c):
    if i % 3 == 0 or i % 5 == 0:
      total += i
print (total)
Posted by: Guest on September-11-2021

Code answers related to "returns the sum of all the multiples of 3 and 5 from 1 to 1000"

Browse Popular Code Answers by Language