public static boolean isPrimeNumber(int number)
{
if (number < 2)
{
return false;
}
for (int i = 2; i <= Math.sqrt(number); i++)
{
if (number % i == 0 && number != 2)
{
return false;
}
}
return true;
}
领取专属 10元无门槛券
手把手带您无忧上云