2022-10-27 15:07:13 +00:00
|
|
|
export function isPrime(value) {
|
|
|
|
// implementar logica aqui
|
2022-10-28 23:40:43 +00:00
|
|
|
let numero = value
|
|
|
|
|
|
|
|
for (let i = 2; i < numero; i++)
|
|
|
|
if (numero % i === 0) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return numero > 1;
|
2022-10-27 15:07:13 +00:00
|
|
|
|
|
|
|
}
|