2. EJERCICIO 1 CONCEPTO 3 <html> <head> <title>Problema</title> </head> <body> <script language="javascript"> var nombre='manuel' var sueldo=400000 document.write('el operario '+nombre); document.write(' tiene un sueldo de '+sueldo); </script> </body> </html>
3. EJERCICIO 1 CONCEPTO 4 <html> <head> </head> <body> <script language="JavaScript"> var nombre; var correo; nombre=prompt('Ingrese su nombre:',''); correo=prompt('Ingrese su correo electronico:',''); document.write('Hola '); document.write(nombre); document.write(' asi que tu correo electronico es '); document.write(correo); </script> </body> </html>
4. EJERCICIO 1 CONCEPTO 5 <html> <head> <script language="JavaScript"> var valor1; valor1=prompt('Ingrese el valor del lado:',''); var producto=valor1*4; document.write('El perimetro es '); document.write(producto); </script> </head> <body> </body> </html>
5. EJERCICIO 2 CONCEPTO 6 <html> <head> </head> <body> <script language="javascript"> var nombre; var clave; var clave2; nombre=prompt('Ingrese nombre:',''); clave=prompt('Ingrese su clave:',''); clave2=prompt('Ingrese su clave nuevamente:',''); if (clave==clave2) { document.write(nombre+' la calve es correcta '); } </script> </body> </html>
6. EJERCICIO 1 CONCEPTO 7 <html> <head> </head> <body> <script language="javascript"> var num1,num2; num1=prompt('Ingrese el primer número:',''); num2=prompt('Ingrese el segundo número:',''); num1=parseInt(num1); num2=parseInt(num2); var suma=num1+num2 var resta=num1-num2 var producto=num2*num1 var division=num1/num2 if (num1>num2) { document.write('La suma es '+suma); documen.write(' y su resta es '+resta); } else { document.write('el producto es '+producto); document.write(' y su division es '+division); } </script> </body> </html>
8. EJERCICIO 3 CONCEPTO 9 <html> <head> </head> <body> <script language="javascript"> var num1,num2,num3; num1=prompt('Ingrese primer número:',''); num2=prompt('Ingrese segundo número:',''); num3=prompt('Ingrese tercer número:',''); num1=parseInt(num1); num2=parseInt(num2); num3=parseInt(num3); if (num1<10 && num2<10 && num3<10) { document.write('todos los numeros son menores a 10'); } else { if (num1>10 && num2<10 && num3>10) { document.write('el segundo numero es menor que 10'); } else { if (num1>10 && num2>10 && num3<10) { document.write('el tercer numero es menor que 10'); } else { document.write('todos los numeros son mayores que 10'); } } } </script> </body> </html>
9. EJERCICIO 1 CONCEPTO 10 <html> <head> </head> <body> <script language="javascript"> var num1,num2,num3; num1=prompt('Ingrese numero 1:',''); num2=prompt('Ingrese numero 2:',''); num3=prompt('Ingrese numero 3:',''); num1=parseInt(num1); num2=parseInt(num2); num3=parseInt(num3); if (num<10 || num2<10 || num3<10) { document.write('todos los numeros son menores a diez.'); } </script> </body> </html>
10. EJERCICIO 1 CONCEPTO 11 <html> <head> <title>Problema</title> </head> <body> <script language="javascript"> alert("digite 1. casa 2. mesa 3. perro 4. gato") var op = prompt("entre la opcion:", " "); var op = parseInt (op); switch(op) { case 1: alert("home"); break; case 2: alert("table"); break; case 3: alert("dog"); break; case 4: alert("cat"); break; default:alert("numero no valido, ingrese un numero de 1 a 4"); } </script> </body> </html>