public static boolean searchZhishu(int num) {
if (num <= 3) {
return num > 1;
}
// boolean result=false;
for (int i = 3; i < Math.sqrt(num); i += 2) {
if (num % i == 0) {
return false;
}
}
return true;
}
public static boolean searchZhishu(int num) {
if (num <= 3) {
return num > 1;
}
// boolean result=false;
for (int i = 3; i < Math.sqrt(num); i += 2) {
if (num % i == 0) {
return false;
}
}
return true;
}