Skip to content

Instantly share code, notes, and snippets.

@CoolOppo
Created September 18, 2014 03:45
Show Gist options
  • Save CoolOppo/4c48b9222adac83f4c83 to your computer and use it in GitHub Desktop.
Save CoolOppo/4c48b9222adac83f4c83 to your computer and use it in GitHub Desktop.
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