Desafio 5 atualizado

This commit is contained in:
matheusjardimgarcia 2022-10-31 21:04:07 -03:00
parent 70c47dc9ee
commit 90a275d6e8

View File

@ -1,4 +1,12 @@
export function isPrime(value) { function isPrime(num) {
// implementar logica aqui var resposta ;
for (var divisor = 2; divisor < num; divisor++)
} if (num % divisor == 0 ) return false;
return true;
}
var determinadoNumero = 60;
for (var i = 2; i < determinadoNumero; i++) if (isPrime(i)) {console.log(i,true)}else{
console.log(i,false)
};