Skip to content

Instantly share code, notes, and snippets.

@dstyle0210
Created July 12, 2016 06:53
Show Gist options
  • Select an option

  • Save dstyle0210/447a5125fe9f6e3443f199b154660950 to your computer and use it in GitHub Desktop.

Select an option

Save dstyle0210/447a5125fe9f6e3443f199b154660950 to your computer and use it in GitHub Desktop.
코딩도장 공부 : Multiples of 3 and 5
// 코딩도장 공부
// http://codingdojang.com/scode/350
var s = 0;
for(i=1;i<1000;i++){
s += (i%3==0 || i%5==0) ? i : 0;
}
console.log(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment