Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //autor:Andy dela Cruz
- //descripcion:proyect euler numero 4
- var numero=1;
- var primos=[];
- var susecion=function(numero){
- if(numero>1000){
- var maximo=primos[primos.length-1];
- var minimo=primos[primos.length-2];
- var total=(maximo*minimo);
- console.log("el numero buscado es"+ total);
- console.log ("Los factores primos son " +maximo+" y "+minimo+ ".");
- }else{
- if(906609%numero===0){
- div1=(numero/2);
- if(div1%2===0 || div1%3===0 ){
- return("error")
- }else{
- console.log (numero);
- primos.push(numero);
- }
- }
- numero++
- susecion(numero)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement