One of geometry's most useful formulas, the Pythagorean Theorem, can be applied to the numbers you enter in JavaScript! Just enter 'A' and 'B' and the script solves for 'C'.
Add the below code to the <body> section of your page:
<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin function
solvepy(form){ a =parseInt(form.a.value); b =parseInt(form.b.value); form.c.value=Math.sqrt(a*a
+
b*b);
} // End --> </script> <form> The Pythagorean Theorem <br><br>
<tt>(
a<sup>2</sup>
+ b<sup>2</sup>
= c<sup>2</sup>
)</tt>
<br><br> <inputtype=textname=asize=3><sup>2</sup>
+ <inputtype=textname=bsize=3><sup>2</sup>
= <inputtype=textname=csize=8> <br><br> <inputtype=buttonvalue="Solve"onClick="solvepy(this.form)">
</form>