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