I am trying to run this code to print the sum of all the prime numbers less than 2 million. This loop is never ending. Can anyone tell me what is wrong with the code? It see
A naive isPrime function must calculate all the primes up to i (or at least up to sqrt(i)) each time it runs. Make sure your isPrime function caches its results!