DEV Community

Discussion on: Project Euler #1 - Multiples of 3 and 5

Collapse
 
sait profile image
Sai gowtham • Edited
let sum=0;
let start=999;

 while(start){
    if(start % 3 === 0 || start % 5===0){
       sum +=start;
    }  
   start--;  
 }

console.log(sum);