re: Project Euler #1 - Multiples of 3 and 5 VIEW POST

FULL DISCUSSION
 

function multiple(){
var a=Math.trunc(999/3)
var b=Math.trunc(999/5)
var c=Math.trunc(999/15)

var multi3=((3*a)(a+1))/2
var multi5=((5*b)
(b+1))/2
var multi15=((15*c)*(c+1))/2

var sum=(multi3+multi5)-multi15
return sum
}
console.log(multiple())

code of conduct - report abuse