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
static boolean isPrime(int n) { if (n == 1) return false; for(int i = 2; i <= n/2; i++) if(n % i == 0) return false; return true; }