Adivina-Adivinador
<script>
function saltarLinea() {
document.write("<br>");
document.write("<br>");
document.write("<br>");
}
function imprimir(frase) {
document.write(frase);
saltarLinea();
}
function sortea(n){
Math.round(Math.random()*n);
}
var numeroPensado = Math.round(Math.random()* 20);
var n = numeroPensado;
var numeroLanzado = parseInt(prompt("Ingrese un numero del 1-20"));
if (n == numeroLanzado){
imprimir("usted acertó");
}else {
imprimir("usted erró, el número pensado era " + n);
}
</script>