[Solved] Determine if a number is prime [closed]
You are missing a bracket. If you keep your code clean it will solve the problem. Also in your if statement you are checking if number % 2 != 0. If it does not equal to 0 then it could potentially be a prime number. So I changed it to number % 2 == 0 … Read more