- 1
I too know of using continue and break statements let take a example of prime number 555643 to check it is prime are not loop sh
I too know of using continue and break statements let take a example of prime number 555643 to check it is prime are not loop should be used efficienctly
1 Antwort
+ 9
if the number is divisible, break the loop.
for(int i = 3; i <= Math.sqrt(555643); i+=2)
if(555643 % i == 0)
break; // is prime, lets get outa here