Last active
December 18, 2015 22:38
-
-
Save Softwave/5855442 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
/* Seeing if I can complete the first project euler problem with | |
javascript and node.js */ | |
var sum = 0; | |
var r; | |
var r2; | |
for (var i = 0;i < 1000;i++) { | |
r = i % 3; | |
r2 = i % 5; | |
if ((r == 0) || (r2 == 0)) { | |
sum += i; | |
} | |
} | |
console.log('%d \n', sum); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment