//I coded this question in python here is how i got the ans 25:
from numpy import integer
count=0
finalcount=0
for i in range (100,999):
if i/18 == int(i/18):
count= count + 1
n=i
if sum([int(d) for d in str(n)])==18:
finalcount= finalcount + 1
print(finalcount)
// answer is 25
const findSum = n => {
let countArr = []
for(let i = 0; i <= n; i++) if(i % 3 === 0 || i % 5 === 0) countArr.push(i)
return countArr.reduce((acc , curr) => acc + curr)
}
console.log(findSum(5))
// With love @kouqhar
total_sum = 0
for i in range(1000):
if (i%3 == 0 or i%5 == 0):
total_sum = total_sum+i
print total_sum