asdf
unknown
plain_text
4 years ago
308 B
6
Indexable
public static boolean esPrimo(int n){
int div; //divisor
if (n<=1){
return false;
}
div = 2;
while (div <= Math.sqrt(n)){
if (n % div == 0){
return false;
}
div++;
}
return true;
}Editor is loading...