Problem 10: Summation of primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below n
.
Test
{{test}}Console output
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below n
.
Use Cmd instead of Ctrl if you're on a Mac.
g | Focus editor |
Ctrl-Enter | Run the test with current code |
Ctrl-Shift-K | Reset the editor |
Ctrl-Shift-L | Clear console output |
Ctrl-Shift-X | Show the solution |
[ | Previous challenge |
] | Next challenge |
T | Back to top page |
? | Show this dialog |
ESC | Hide this dialog |
Shift-ESC | Blur focus from editor |