/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> var n1; var n2; var n3; n1=Number(prompt('Ingrese 1er NUMERO','')); n2=Number(prompt('Ingrese 2do NUMERO','')); n3=Number(prompt('Ingrese 3er NUMERO','')); if(n1>n2 && n1>n3){ if(n2>n3){ document.write(n1+','+n2+','+n3); }else{ document.write(n1+','+n3+','+n2); } } if(n2>n1 && n2>n3){ if(n1>n3){ document.write(n2+','+n1+','+n3); }else{ document.write(n2+','+n3+','+n1); } } if(n3>n1 && n3>n2){ if(n1>n2){ document.write(n3+','+n1+','+n2); }else{ document.write(n3+','+n2+','+n1); } } </script>