question

Alguem pode por favor me dar um codigo para juros compostos usando HTML e Javascript?

Olá, eu estou em um curso de programação de computador e eu tenho tido um semestre áspero. Alguns problemas familiares, nenhum serviço de internet até ontem e um TA terrível. Eu tenho um enorme projeto devido em um par de dias e nenhuma idéia como começar mesmo. Qualquer ajuda, mesmo apenas conselhos que não é a resposta direta seria apreciada. Obrigado! Eu vou comércio informação matemática, se alguém precisa dele.
resposta Resposta
Código corta... Basta ir às fontes.







<! THREE STEPS TO INSTALL COMPOUND INTEREST:

1. Copy the coding into the HEAD of your HTML document

2. Add the onLoad event handler into the BODY tag

3. Put the last coding into the BODY of your HTML document >

<! STEP ONE: Paste this code into the HEAD of your HTML document >

<HEAD>

<SCRIPT language="JavaScript">

<! This script and many more are available free online at >

<! Begin

<!

var princ;

var ratepc;

var years;

function calcAmt(frm) {

princ = frm.pr.value;

ratepc = frm.rt.value;

years = frm.yr.value;

frm.amt.value = Math.round(princ(Math.pow((1+ratepc/100),years))100)/100;

frm.intr.value = Math.round((princ(Math.pow((1+ratepc/100),years))-princ)100)/100

}

function checkRate(frm) {

if (ratepc == 0 || ratepc > 30){

window.alert("Make sure that the Interest Rate really is " + ratepc +"%?")

}

}

function checkTerm(frm) {

if (years == 0 || years > 30){

window.alert("Make sure that the Term really is " + years + " years?")

}

}

// End >

</SCRIPT>

</HEAD>

<! STEP TWO: Insert the onLoad event handler into your BODY tag >

<BODY onload="frm.pr.focus()">

<! STEP THREE: Copy this code into the BODY of your HTML document >

<CENTER>

<FORM method="GET" name="frm" onreset="frm.pr.focus()">

<TABLE border="5" bgcolor="C0C0C0" cellpadding="2" width="">

<TR><TD colspan="3" align="CENTER">

<B><FONT size="5" color="#0000FF">C<FONT size="4">OMPOUND <FONT size="5">I<FONT size="4">NTEREST</FONT> </FONT> </FONT></FONT></B>

</TD></TR>

<TR><TD align="RIGHT">Principal</TD><TD>

<INPUT type="TEXT" name="pr" value="" size="10" maxlength="10" onchange="calcAmt(this.form)"></TD>

<TD rowspan="4" align="CENTER" bgcolor="#CBCBCB"><FONT size="1">Meses<BR>1 = 08<BR>2 = 17<BR>3 = 25<BR>4 =.33<BR>5 = 42<BR>6 =,50<BR>7 =.58<BR>8 = 67<BR>9 = 75<BR>10 = 83<BR>11 =.92</FONT></TD></TR>

<TR><TD align="RIGHT">Taxa de</TD><TD>

<INPUT type="TEXT" name="rt" value="" size="5" maxlength="6" onchange="calcAmt(this.form); checkRate(this.form)"></TD></TR>

<TR><TD align="RIGHT">Anos</TD><TD>

<INPUT type="TEXT" name="yr" value="" size="5" maxlength="6" onchange="calcAmt(this.form); checkTerm(this.form)"></TD></TR>

<TR><TD align="RIGHT">Quantidade</TD><TD>

<INPUT type="TEXT" name="amt" value="" size="10"></TD></TR>

<TR><TD align="RIGHT">Interesse</TD><TD>

<INPUT type="TEXT" name="intr" value="" size="10"></TD><TD> </TD></TR>

<TR><TD>

<INPUT type="BUTTON" name="calc" value="Calculate" size="10" onclick="calcAmt(this.form)"></TD><TD> </TD>

<TD>

<INPUT type="RESET" name="clear" value="Clear"></TD></TR>

</TABLE>

</FORM>

</CENTER>



<p><center>

<font face="arial, helvetica" size"-2"="">JavaScripts grátis fornecidos



</center><p>

<! Script Size: 3.36 KB ></BODY>

ComentáriosComentários
Acho que a resposta não está correta ou que você gostaria de acrescentar mais
alguma informação? Envie o seu comentário abaixo..

Guest


HTML não é permitido!

Image Code

Digite os caracteres que aparecem na imagem por isso sabemos que você é humano!

Receber um email quando alguém acrescenta outro comentário a esta pergunta


Topo da página


Home  Terms
Copyright © Accelerated Ideas 2005-2024
All rights reserved