Created
September 18, 2014 03:45
-
-
Save CoolOppo/4c48b9222adac83f4c83 to your computer and use it in GitHub Desktop.
This file contains 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
var the_sum = 0; | |
for (var i = 5; i < 1000; i++) { | |
if (i / 5 == Math.floor(i / 5)) { | |
the_sum += i; | |
} | |
} | |
for (var i = 3; i < 1000; i++) { | |
if (i / 3 == Math.floor(i / 3)) { | |
if (i / 5 != Math.floor(i / 5)) { | |
the_sum += i; | |
} | |
} | |
} | |
console.log(the_sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment