top of page

Problem 07
This is a C++ solution to Project Euler problem 07 found at: https://projecteuler.net/problem=7
My Algorithm
For this problem, we just need to find the 10,001st prime number. To do this, we can create a function to check if a number is prime and return either 'true' or 'false' accordingly. Then, we can create a counter variable that corresponds to how many primes have been found and a variable that holds the number you are currently checking. Next, we need to have a while-loop that continues until the counter is equal to 10,001. Once this condition is met, we can return the final answer of 104743.
Full Solution on GitHub
bottom of page