0
What's wrong on it
Can anyone tell what is wrong in this code to find prime numbersy https://www.sololearn.com/discuss/3030793/?ref=app https://code.sololearn.com/c8k5L7Sk66J0/?ref=app
3 Respostas
+ 1
You need to start with j = 2 and replace "continue" with "break" to figure out whether a number is "not a prime".
+ 2
Jude Maria Bevan
There are a number of problems with your code, but I think you are trying to stop the continuous loop.
You have placed continue before
j =j+1, which means the code returns to the start of the loop before it increments j.
Therefore j is always =1 and your loop never breaks
+ 2
Got it Thank you