Skip to content

Instantly share code, notes, and snippets.

@egeozcan
Created March 12, 2012 08:49
Show Gist options
  • Save egeozcan/2020770 to your computer and use it in GitHub Desktop.
Save egeozcan/2020770 to your computer and use it in GitHub Desktop.
Answer to 6th problem on project Euler
var i, n, sum = 0;
for(i = 1; i < 100; i++) {
for(n = 100; n > i; n--) {
sum += n * i
}
}
console.log("result is: " + (sum * 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment