Anda di halaman 1dari 5

Problema 1.

<html>
<head>
</head>
<body>
<script type="text/javascript">
var nombre='Juan';
var sueldo=6500;
document.write(nombre);
document.write('<br>');
document.write(sueldo);
</script>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var nombre=prompt(" su nombre");
var email=prompt("ingrese su email");
document.write(nombre);
document.write("<br>");
document.write(email);

</script>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var lado;
lado=prompt('ingrese tamao del lado:','');
var perimetro;
perimetro=lado*4;
document.write('el perimetro es:');

document.write(perimetro);
</script>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var n1;
var n2;
var n3;
var n4;
n1=prompt('ingrese n1:','');
n2=prompt('ingrese n2:','');
n3=prompt('ingrese n3:','');
n4=prompt('ingrese n4:','');
var suma;
suma=parseInt(n1)+ parseInt(n2);
document.write('la suma es:');
document.write(suma);
document.write("<br>");
var producto;
producto=n3*n4;
document.write('el producto es:');
document.write(producto);
</script>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var precio;
precio=prompt('ingrese precio producto:','');
var cantidad;
var precio;
var total;
cantidad=prompt('ingrese cantidad productos:','');
total=cantidad * precio;
document.write("total a pagar");
document.write("<br>")
document.write(total);

</script>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var num1;
var num2;
var num3;
var num4;
num1=prompt('ingrese
num2=prompt('ingrese
num3=prompt('ingrese
num4=prompt('ingrese

num1:','');
num2:','');
num3:','');
num4:','');

var suma;
suma=parseInt(num1)+parseInt(num2)+parseInt(num3)+parseInt(num4);
document.write("la suma es:")
document.write(suma);
document.write("<br>");
var producto;
producto=(num1)*(num2)*(num3)*(num4);
document.write("el produccto es:")
document.write(producto);
</script>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var calif1;
var calif2;
var calif3;
calif1=prompt('ingrese calificacion1:','');

calif2=prompt('ingrese calificacion2:','');
calif3=prompt('ingrese calificacion3:','');
var suma;
var promedio;
suma=parseInt(calif1)+parseInt(calif2)+parseInt(calif3);
promedio=suma/3;
if(promedio>=7)
document.write('promocionado');
else
document.write('no promocionado');
</script>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var clave1;
var clave2
clave1=prompt('ingrese su clave:','');
clave2=prompt('vuelva ingresar su clave:','');
if(clave1==clave2)
{
document.write('clave identica');
}
else
{
document.write('la clave no coincide');
}
</script>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var num1;
var num2;
num1=prompt('ingrese num1:','');
num2=prompt('ingrese num2:','');
if (num1>num2)

{
var suma;
var diferencia;
suma=parseInt(num1)+parseInt(num2);
document.write('la suma es:'+suma);
document.write("<br>");
diferencia=(num1)-(num2);
document.write('la diferencia es:'+diferencia);
}
</script>
</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------------<html>
<head>
</head>
<body>
<script type="text/javascript">
var nota1;
var nota2;
var nota3;
var nota4;
num1=prompt('ingrese num1:','');
num2=prompt('ingrese num2:','');
num3=prompt('ingrese num3:','');
num4=prompt('ingrese num4:','');
var suma;
var promedio;
suma=parseInt(num1)+parseInt(num2)+parseInt(num3)+parseInt(num4);
promedio=suma/3;
if (promedio>=4)
{
document.write('regular');
}
else
{
document.write('reprobado');
}
</script>
</body>
</html>

Anda mungkin juga menyukai