You are on page 1of 3

<html>

<head><title>rubrica 4</title>

<BODY><H1>MULTIPLICACION, DIVICION Y RESTA</H1>

<form name="muldire">

valor 1:<input type="text" name="a"> valor 2:<input type="text" name="b">valor para


restar:<input type="text" name="c">valor para dividir:<input type="text" name="m"><br><br>

resultado de multiplicacion:<input type="text" name="r">resultado de divicion:<input type="text"


name="l">resultado de resta:<input type="text" name="d"><br>

<input type="button" value="calcular" onClick="i()"><input type="submit" value="Borrar">

<h2>binomio</h2>

valor1:<input type="text" name="n">pot:<input type="text" name="p">resultado:<input


type="text" name="q">

<input type="button" value="calcular bino" onClick="s()">

<h3>trinomio</h3>

valor1:<input type="text" name="t">valor2:<input type="text" name="o">pot:<input type="text"


name="e">resultado:<input type="text" name="w">

<input type="button" value="calcular trino" onClick="z()">

</form>

<script lenguaje="JavaScript">

function i()

document.muldire.r.value=document.muldire.a.value * document.muldire.a.value;

document.muldire.l.value=document.muldire.m.value / document.muldire.r.value;

document.muldire.d.value=document.muldire.c.value - document.muldire.r.value;

</script>

<script lenguaje="JavaScript">
function s()

var x=0;

var y=0;

x=document.muldire.n.value;

y=document.muldire.p.value;

for (var x1=2; x1<=y; x1++)

x=x*document.muldire.n.value;

document.muldire.q.value=x-6

</script>

<script lenguaje="JavaScript">

function z()

var x=0;

var y=0;

var u=0;

var ñ=0;

x=document.muldire.t.value;

y=document.muldire.e.value;

u=document.muldire.o.value;

ñ=document.muldire.e.value;

for (var x1=2; x1<=y; x1++)


{

x=x*document.muldire.t.value;

for (var x2=2; x2<=ñ; x2++)

u=u*document.muldire.o.value;

u=3*u;

document.muldire.w.value=x+u;

</script>

</body:html>

You might also like