Seguidores

jueves, 3 de octubre de 2019

octava clase

CODIGO PARA PROMEDIO

<html>
    <body bgcolor="green">
        


<title> Estructuras condicionales </title>
Uso de las estructuras condicionales IF <br>
ingreso de Notas y solucionar Notas promediales <br><br>
Nombre del Alumno Nota1 Nota 2 Nota 3 Promedio <br>
<input type="button" value ="promedio" onclick ="prom();"> <br>
<input type="text" id="tnom" size="20">
<input type="text" id="t1"value="0" size="4">
<input type="text" id="t2" value="0"  size="4">
<input type="text" id="t3" value="0"  size="4">
<input type="text" id="tprom" value="0" size="4">
<input type="text" id="tobs" value="0"size="15">
<br>


<script>
function prom(){
    var n1=document.getElementById('t1').value;
    var n2=document.getElementById('t2').value;
    var n3=document.getElementById('t3').value;
    var pro=(parseInt(n1)+parseInt(n2)+parseInt(n3))/3;
    document.getElementById('tprom').value=pro
    if (pro<10.4){
        document.getElementById('tobs').value="desaprobado"
    } else{
        document.getElementById('tobs').value="aprobado"
    }
}


</script>
CODIGO PARA TU  PROGRAMA HTML <br><fieldset>
<textarea>
    
        <html>
                <title> Estructuras condicionales </title>
                Uso de las estructuras condicionales IF <br>
                ingreso de Notas y solucionar Notas promediales <br><br>
                Nombre del Alumno Nota1 Nota 2 Nota 3 Promedio <br>
                <input type="text" id="t1" size="16">
                <input type="text" id="t2" size="4">
                <input type="text" id="t1" size="4">
                <input type="text" id="t1" size="4">
                <input type="text" id="t1" size="4">
                <br>
                <input type="button" id="b1" value="Promedio">
                </html>
</textarea></fieldset>
</body></html>


CODIGO PARA UNA TIENDA
<html>
<body style="background-color:rgb(255,0,0);">
</body>
<font size="10" color="black">BODEGA "ELITA"</font>
<hr>
<body background="bg.jpg">
<form name="examen" method="">
<h2>Cantidad &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Descripcion &nbsp;&nbsp;
&nbsp;&nbsp;Precio &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="total" onclick="TOT();">
</h2>
<p>
<input type="text" id="t1" value="6" size="08">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t2" value="4" size="15">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t3" value="2" size="7">&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t4" value="0" size="7">
<p>
<input type="text" id="t5" value="4" size="08">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t6" value="8" size="15">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t7" value="6" size="7">&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" id="t8" value="0" size="7">
<hr>
<font size="6">Subtotal</font>&nbsp;&nbsp; <input type="text" id="tp" size="8">
<p>
<font size="6">Descuento del 10%</font>
<br>
<input type="radio" name="radio1" id="radio1" />Si<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="y9" size="5"><p>
<input type="radio" name="radio1" id="radio1" />No<br>
<hr>
<input type="button" name="result" id="result" value="RESPUESTA" onclick="cont()"/>
<input type="text" id="y9" size="5">
</form>
<script>
function TOT() {
var n1=document.getElementById('t1').value;
var n2=document.getElementById('t2').value;
var n3=document.getElementById('t3').value;
var total= parseInt(n1) + parseInt(n2) + parseInt(n3) ;
document.getElementById('t4').value=total
var n1a=document.getElementById('t5').value;
var n2a=document.getElementById('t6').value;
var n3a=document.getElementById('t7').value;
var totala= parseInt(n1a) + parseInt(n2a) + parseInt(n3a) ;
document.getElementById('t8').value=total
var tit= parseInt(total)/2 + parseInt(totala)/2;
document.getElementById('tp').value=tit
}
</script>

</html>
OPERACIONES
<html>
<body bgcolor="grenn">
<script>
function cont() {
var c=0;
if(document.forms['examen']['radio1'][0].checked)
{ c++;
var n1=document.forms['examen']['t1'].value;
var n2=document.forms['examen']['t2'].value;
var sum=parseInt(n1)+ parseInt(n2);
document.forms['examen']['tr'].value=sum;
}
else
{ var n1=document.forms['examen']['t1'].value;
var n2=document.forms['examen']['t2'].value;
var res=parseInt(n1)- parseInt(n2);
document.forms['examen']['tr'].value=res; }
}
</script>
<form name="examen">
Numero 01 <input type="text" id="t1"><br>
Numero 01 <input type="text" id="t2">
<hr>
<input type="radio" name="r1" id="radio1"> Sumar
<input type="radio" name="r1" id="radio1"> Restar
<hr>
<input type="button" Value="Respuesta" onclick="cont();">
<input type="text" id="tr">
</form>
</body>
</html>
tabla
<html>
<fieldset style="width:20%">
Tabla de multiplicar <br>
</fieldset>
<fieldset style="width:20%">
<script>
var i=0; for (i=0;i<=12;i++)
{
document.write("N. " + i +" x 2 =" );
document.write("<font color=blue>" + (i*2) + "</font>");
document.write("<br />");
}
document.write("<hr>");
for (i=0;i<=12;i++)
{
document.write("N. " + i+" x 3 =" + (i*3 ) );
document.write("<br />");
}
document.write("<hr>");
for (i=0;i<=5;i++)
{
document.write("N. " + i+" x 4 =" + (i*4 ) );
document.write("<br />");
}
document.write("<hr>");
for (i=0;i<=5;i++)
{
document.write("N. " + i+" x 5 =" + (i*5 ) );
document.write("<br />");
}
</script>
</html>

</html>

imagen 


<html>
<body background="01.jpg">
</body>
<br>
<center><H1><marquee behaviador="alterne" hspace="400" scrollamount="10">
<font face="Cooper" color="black">
Ayacucho - Peru
</font>
</marquee><H1></center>
<body bgcolor="#ACD1D0">
</body>
<h1> Ciudad de Ayacucho </h1>
La fe del pueblo ayacuchano se refleja en los templos construidos a lo largo de la ciudad. Además, disfruta la arquitectura colonial presente en cada rincón.
<br><br>
<button type="button" onclick="verfoto1()">platos tipicos</button>
<button type="button" onclick="verfoto2()">carnavales</button>
<button type="button" onclick="verfoto3()">semana santa</button>
<div id="myDiv" style="border:1px solid black; height:400;
width:400;">
Imagen capturada</div>
<script>
function verfoto1()
{ document.getElementById("myDiv").style.backgroundImage="url('platos.png')";}
function verfoto2()
{ document.getElementById("myDiv").style.backgroundImage="url('rural.jfif')";}
function verfoto3()
{ document.getElementById("myDiv").style.backgroundImage="url('santa.jpg')";}
</script>
</body>
</html>

index

<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="miestilo.css">
</head>
<body>
<div id="titulo">
<h1>Bienvenidos a mi Pagina Web</h1>
</div>
<div id="amarillo">
<img src="imagenes/image01.png">
</div>
<div id="verde">
<p>
Crea un sitio web de aspecto profesional en sólo 3 fáciles pasos. Escoge entre miles de diseños de sitios personalizados para tu negocio..
</p>
<img class="cambio" src="imagenes/image02.png">
<img class="cambio" src="imagenes/image04.png">
<img class="cambio1"src="imagenes/image05.png">
</div>
</body>
</html>

cambio de dolares

<html>
        <h1> Convertirde soles a dolares </h1> 
        <hr>
            Valor de Soles <input type="text" id="txvalor"> <br>
            Tipo de Cambio <input type="text" id="txcambio">
        <hr>
           <input type="button" value="Total">
           <input type="text" id="txtot">
           dolares
        
        </html>








No hay comentarios.:

Publicar un comentario

netbeans java

LEJGUAJE DE PROGRAMACION I Ejercicios sobre operadores aritméticos Java Ejercicio 1: Si a, b y c son variables enteras con valores a=8, b=...