Hesap makinesi
ÖnizlemeSitenize Eklemek İçin Kod
<!-- http://botdefteri.tr.gg/--> <center> <form action="" name="Keypad"> <b> </b> <table> </table> <table width="50" height="60" cellspacing="5" cellpadding="1" border="2"> <tbody> <tr> <td align="center" colspan="3"><input width="100%" type="Text" value="0" size="24" name="ReadOut" /></td> <td td=""> </td> <td><input type="Button" onclick="Clear()" value=" C " name="btnClear" /></td> <td><input type="Button" onclick="ClearEntry()" value=" CE " name="btnClearEntry" /></td> </tr> <tr> <td><input type="Button" onclick="NumPressed(7)" value=" 7 " name="btnSeven" /></td> <td><input type="Button" onclick="NumPressed(8)" value=" 8 " name="btnEight" /></td> <td><input type="Button" onclick="NumPressed(9)" value=" 9 " name="btnNine" /></td> <td> </td> <td><input type="Button" onclick="Neg()" value=" +/- " name="btnNeg" /></td> <td><input type="Button" onclick="Percent()" value=" % " name="btnPercent" /></td> </tr> <tr> <td><input type="Button" onclick="NumPressed(4)" value=" 4 " name="btnFour" /></td> <td><input type="Button" onclick="NumPressed(5)" value=" 5 " name="btnFive" /></td> <td><input type="Button" onclick="NumPressed(6)" value=" 6 " name="btnSix" /></td> <td> </td> <td align="center"><input type="Button" onclick="Operation('+')" value=" + " name="btnPlus" /></td> <td align="center"><input type="Button" onclick="Operation('-')" value=" - " name="btnMinus" /></td> </tr> <tr> <td><input type="Button" onclick="NumPressed(1)" value=" 1 " name="btnOne" /></td> <td><input type="Button" onclick="NumPressed(2)" value=" 2 " name="btnTwo" /></td> <td><input type="Button" onclick="NumPressed(3)" value=" 3 " name="btnThree" /></td> <td> </td> <td align="center"><input type="Button" onclick="Operation('*')" value=" * " name="btnMultiply" /></td> <td align="center"><input type="Button" onclick="Operation('/')" value=" / " name="btnDivide" /></td> </tr> <tr> <td><input type="Button" onclick="NumPressed(0)" value=" 0 " name="btnZero" /></td> <td><input type="Button" onclick="Decimal()" value=" . " name="btnDecimal" /></td> <td colspan="3"> </td> <td><input type="Button" onclick="Operation('=')" value=" = " name="btnEquals" /></td> </tr> </tbody> </table> <b> </b> </form> </center> <font size="2" face="Verdana, Arial, Helvetica"> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var FKeyPad = document.Keypad; var Accumulate = 0; var FlagNewNum = false; var PendingOp = ""; function NumPressed (Num) { if (FlagNewNum) { FKeyPad.ReadOut.value = Num; FlagNewNum = false; } else { if (FKeyPad.ReadOut.value == "0") FKeyPad.ReadOut.value = Num; else FKeyPad.ReadOut.value += Num; } } function Operation (Op) { var Readout = FKeyPad.ReadOut.value; if (FlagNewNum && PendingOp != "="); else { FlagNewNum = true; if ( '+' == PendingOp ) Accumulate += parseFloat(Readout); else if ( '-' == PendingOp ) Accumulate -= parseFloat(Readout); else if ( '/' == PendingOp ) Accumulate /= parseFloat(Readout); else if ( '*' == PendingOp ) Accumulate *= parseFloat(Readout); else Accumulate = parseFloat(Readout); FKeyPad.ReadOut.value = Accumulate; PendingOp = Op; } } function Decimal () { var curReadOut = FKeyPad.ReadOut.value; if (FlagNewNum) { curReadOut = "0."; FlagNewNum = false; } else { if (curReadOut.indexOf(".") == -1) curReadOut += "."; } FKeyPad.ReadOut.value = curReadOut; } function ClearEntry () { FKeyPad.ReadOut.value = "0"; FlagNewNum = true; } function Clear () { Accumulate = 0; PendingOp = ""; ClearEntry(); } function Neg () { FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1; } function Percent () { FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate); } // End --> </SCRIPT> <font face="Tahoma"><a href="http://botdefteri.tr.gg/" target="_blank"><span style="font-size: 8pt; text-decoration: none"> calculator</span></a></font> |
BotDefteri.tr.gg__Paylaşacakların Alıntı belirtmesi rica olunur