Created
July 12, 2016 06:53
-
-
Save dstyle0210/447a5125fe9f6e3443f199b154660950 to your computer and use it in GitHub Desktop.
코딩도장 공부 : Multiples of 3 and 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 코딩도장 공부 | |
| // 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