Wednesday, 16 September 2015
Scientific Notation To Decimal Converter Code


-----------------------------------------------------------------------------------------------------------------
COPY AND PASTE BELOW CODE IN POST HTML SECTION
------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>Scientific Notation To Decimal Converter</title>
<script language="JavaScript">
function perRound(num, precision) {
var precision = 3;
precision = parseInt(precision);
var result1 = num * Math.pow(10, precision);
var result2 = Math.round(result1);
var result3 = result2 / Math.pow(10, precision);
return zerosPad(result3, precision);
}
function zerosPad(rndVal, decPlaces) {
var valStrg = rndVal.toString();
var decLoc = valStrg.indexOf(".");
if (decLoc == -1) {
decPartLen = 0;
valStrg += decPlaces > 0 ? "." : "";
}
else {
decPartLen = valStrg.length - decLoc - 1;
}
var totalPad = decPlaces - decPartLen;
if (totalPad > 0) {
for (var cntrVal = 1; cntrVal <= totalPad; cntrVal++)
valStrg += "0";
}
return valStrg;
}
function clear_field(field) {
if (field.value==field.defaultValue) {
field.value='';
}
}
function DefaultVal(){
var mantissa=Math.random()*9+1;
mantissa=0.001*Math.round(1000*mantissa);
var exponent=Math.random()*8;
exponent=Math.floor(exponent);
var sign=Math.random()*2-1;
if(sign<0) exponent*=-1;
document.convertform.mantissa.value=mantissa;
document.convertform.exponent.value=exponent;
document.convertform.corans.value=0;
}
function ClearVal(){
var mantissa = 0;
var exponent = 0;
document.convertform.mantissa.value=mantissa;
document.convertform.exponent.value=exponent;
document.convertform.corans.value=0;
}
function Convert(){
var CorrectAnswer=parseFloat(document.convertform.mantissa.value)*Math.pow(10,parseFloat(document.convertform.exponent.value));
document.convertform.corans.value=CorrectAnswer;
}
</script>
</head>
<BODY>
<meta name="viewport" content="width=958, initial-scale=1">
<tr><td colspan="3"><br />
</td></tr>
</table></div>
<table ALIGN="center" width="950" BORDER=0 CELLPADDING=5>
<tr BGCOLOR=#FFFFFF>
<td WIDTH=80%>
<h1>Scientific Notation To Decimal Converter</h1>
<tr BGCOLOR=#B6D4D2>
<br><br>
<form name="convertform">
<center>
<tr BGCOLOR=#FFFFFF valign="top">
<table align="center" BORDER=5 CELLPADDING=5>
<tr BGCOLOR=#B6D4D2>
<td align="center" colspan="2">
Scientific Notation Required Data Entry
</tr>
<tr>
<td>
Convert The Number
<input type="text" size="18" value="0" name="mantissa"> (mantissa) x 10^
</td>
<td>
<input type="text" size="10" value="0" name="exponent"> (exponent)
</td>
</tr>
<tr>
<td colspan="2" align="center" BGCOLOR=#B6D4D2>
<input type="button" name="check" value="Convert" onClick="Convert()">
<input type="button" name="new" value="Assign Random Default Values" onClick="DefaultVal()">
<input type="Reset" value="Clear Values" onClick="ClearVal()">
<br />
<hr style="background:#ffd148;border:0;height:5px" />
<hr style="background:#ffd148;border:0;height:5px" />
</td>
</tr>
<tr BGCOLOR=#B6D4D2>
<td align="center" colspan="2">
Calculated Decimal Results
</td>
</tr>
<tr>
<td>
The Decimal Equivalent Is
</td>
<td>
<input type="text" size="18" value="0" name="corans" readonly>
</td>
</td></tr>
</form>
</tr></table>
<BR><BR>
</BODY>
</HTML>
Related movie you might like to see :

HTML CSS JAVA COMPRESSOR

ONLINE CSS UNMINIFIER CODE

ONLINE CSS UNMINIFIER

CSSO (CSS Optimizer)

SCRIPT TUTORIALS CSSO CSS COMPOSER ...

WHITE SPACE REMOVER CODE

White Space Remover

COMMENTS REMOVER CODE

COMMENTS REMOVER

FILE SAVE AS WITH JAVA SCRIPT METHO...

FILE SAVE AS WITH JAVA SCRIPT METH...

HTML CSS JAVA COMPRESSOR CODE
?
+
X
Recommended for you
Loading..
Related Post for Scientific Notation To Decimal Converter Code
STANDARD DEVIATION CALCULATOR CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION --------------…
PYTHAGOREAN THEOREM CALCULATOR CODE ---------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION READ MORE: http:…
GREATEST COMMON FACTOR CALCULATOR CODE -------------------------------------------------------------------------------------------------------------------------- READ MORE: http://maths.wordpandit.com/h-c-f-by-…
LCM GCF CALCULATOR CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ----------------…
LINEAR EQUATION CALCULATOR CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION ---------------…
TRIANGLE CALCULATOR CODE ---------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION READ MORE: http:…
NON PERFECT SQUARE ROOT CALCULATOR CODE ----------------------------------------------------------------------------------------------------------------- COPY AND PASTE BELOW CODE IN POST HTML SECTION READ MORE: htt…
PYTHAGOREAN THEOREM CALCULATOR .CalcTable { padding: 4px 6px; border: solid #ddd 1px; border-collapse: collapse } .CalcTitleCell { background-color: transparent; color: #1d487e; font-family: Verdana, A…
STANDARD DEVIATION CALCULATOR .CalcTable { padding: 4px 6px; border: solid #ddd 1px; border-collapse: collapse } .CalcTitleCell { background-color: transparent; color: #1d487e; font-family: Verdana, A…
LCM GCF CALCULATOR Greatest Common Factor and Least Common Multiplier Calculator !-- Begin function go(input1,input2,input3){ if (document.form1.text3.value!=""){ document.form1.answer.…
TRIANGLE CALCULATOR .CalcTable { padding: 4px 6px; border: solid #ddd 1px; border-collapse: collapse } .CalcTitleCell { background-color: transparent; color: #1d487e; font-family: Verdana, A…
CIRCUMFERENCE CALCULATOR ======================================================================== READ MORE: http://www.wikihow.com/Calculate-the-Diameter-of-a-Circlehttp://www.wikihow.com/Work-out-th…
LINEAR EQUATION CALCULATOR #parse_btn { background-color:Blue; color:#FFFFFF; font-size:30px; width:200px; height:50px; } x=3;y=7 Calculate it! Solve Graph Lesson Sh…
NON PERFECT SQUARE ROOT CALCULATOR .CalcTable { padding: 4px 6px; border: solid #ddd 1px; border-collapse: collapse } .CalcTitleCell { background-color: transparent; color: #1d487e; font-family: Verdana, A…
Labels:
TEXT TOOLS
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.