You are on page 1of 4

NOMBRE Y APELLIDO: Rene Huanca Mamani

CODIGO: 632

ENUNCIADO: CONVERTIDOR DE MONEDAS

SOLUCION:

<h1>COMVERTIDOR</h1>

<table border:1px bgcolor="#FFC300">

<td><b>Bolivianos:</b></td><td> <input type="text" id="bs"></td><td> <img src="bs.png"


style="width: 20px; height: 20px;"></td>

</table>

<table border=1 bgcolor="#8EC544">

<tr><td bgcolor="#538F02"></td> <td bgcolor="#538F02"><b>T.C.</b></td> <td


bgcolor="#538F02"> <b>EQUIVALENTE</b></td> </tr>

<tr><td><b>Dolares</b></td> <td>6.96</td> <td> <input type="text" id="sus"> </td><td>


<img src="dolar.png" style="width: 20px; height: 20px;"></td> </tr>

<tr><td><b>Euros</b></td><td> 7.52</td> <td><input type="text" id="euros"></td> <td>


<img src="euros.png" style="width: 20px; height: 20px;"></td> </tr>

<tr><td><b>Soles</b></td> <td>2.23</td><td><input type="text" id="soles"></td> <td> <img


src="sol.png" style="width: 20px; height: 20px;"></td> </tr>

<tr> <td><b>Pesos Chile</b></td> <td>0.011354</td> <td><input type="text"


id="pesos"></td> <td> <img src="pesos.png" style="width: 20px; height: 20px;"></td> </tr>

<tr> <td><b>Reales Brasil</b></td> <td>2.2852</td> <td><input type="text"


id="reales"></td> <td> <img src="reales.jfif" style="width: 20px; height: 20px;"></td></tr>

<tr> <td><b>Yuan China</b></td> <td>1.1379</td> <td><input type="text"


id="yuan"></td><td> <img src="yuan.png" style="width: 20px; height: 20px;"></td> </tr>
<tr> <td><b>Yen Japon</b></td><td>0.05849034</td> <td><input type="text" id="yen"></td>
<td> <img src="yen.jpg" style="width: 20px; height: 20px;"></td></tr> <br>

</table>

<script language="javascript">

function convertir(){

pb = document.getElementById('bs');

pd = document.getElementById('sus');

pe = document.getElementById('euros');

ps = document.getElementById('soles');

pp = document.getElementById('pesos');

pr = document.getElementById('reales');

py = document.getElementById('yuan');

pyj = document.getElementById('yen');

pd.value = pb.value / 6.96;

pe.value = pb.value / 7.52;

ps.value = pb.value / 2.23;

pp.value = pb.value / 0.01135;

pr.value = pb.value / 2.2852;

py.value = pb.value / 1.1379;

pyj.value = pb.value / 0.05849034;

function inicializar(){

pb = document.getElementById('bs');

pd = document.getElementById('sus');

pe = document.getElementById('euros');

ps = document.getElementById('soles');

pp = document.getElementById('pesos');
pr = document.getElementById('reales');

py = document.getElementById('yuan');

pyj = document.getElementById('yen');

pb.value=””;

pd.value = "";

pe.value = "";

ps.value = "";

pp.value = "";

pr.value = "";

py.value = "";

pyj.value = "";

</script>

<br>

<div class="boton0">

<input class="b1" type="button" value="CONVERTIR"

onclick="convertir()">

</div>

<tr> </tr>

<div class="boton1">

<input class="b2" type="button" value="INICIALIZAR"

onclick="inicializar()">

</div>

<style>

.boton0{ margin: 5px 8%; }

.boton1{margin: -30px 35%;}

.b1{font-weight: 900; color: SaddleBrown; background-color: Orange; border-color:


Orange}

.b2{font-weight: 900; color: SaddleBrown; background-color: Orange; border-color:


Orange}

</style>
CORRIDA

You might also like