top of page

Problem 10
This is a C++ solution to Project Euler problem 10 found at: https://projecteuler.net/problem=10
My Algorithm
For this problem, we are asked to find the sum of all primes below two million. To do this, we can create a function that returns a boolean indicating whether a certain number is prime or not. Using this, we can loop through all numbers from two to two million and check if they are prime. If the number is prime, we add it to the running sum we have and return the final sum of 142913828922 once the loop breaks.
Full Solution on GitHub
bottom of page