Java Code for Quadratic Equation Solver
Saturday, 14 February 2009
Sponsored Links
---------------------------------------------------
which means...
"In this Universe there is no sacred place equivalent to Venkatadri(i.e.,There is no place in the whole Universe which is more auspicious than the hill Venkatachala). There is no God equivalent to Lord Venkateswara neither in the past nor in the future going to be(i.e.,There is no Archa murti (worshippable form) in all the three times (present,past and future) whose glories are comparable to the Lord of Venkatachala)"
<!-- Paste this code into an external JavaScript file named: quadEquation.js --> var a,b,c,x1,x2; function getValues() { signB = (document.form.firstSign.value == "+") ? 1 : -1; signC = (document.form.secondSign.value == "+") ? 1 : -1; a = document.form.x2Coef.value; b = document.form.xCoef.value * signB; c = document.form.endValue.value * signC; } function solveForX() { x1 = ((-1*b) + Math.sqrt((b*b) - 4*a*c))/ (2*a); x2 = ((-1*b) - Math.sqrt((b*b) - 4*a*c))/ (2*a); if(document.form.round.checked){ x1 = Math.round(x1*1000)/1000; x2 = Math.round(x2*1000)/1000; } } function factorEq() { if( (Boolean(x1) != false) && (Boolean(x2) != false)) { x1Print = ((x1 * -1) > 0) ? "+" + (x1*-1) : x1 * -1; x2Print = ((x2 * -1) > 0) ? "+" + (x2*-1) : x2 * -1; aPrint = (a > 1 || a < 0) ? a : ""; document.getElementById('testing').innerHTML = "<font color=\"red\">The Solutions Are:</font><br>x1 = " + x1 + "; x2 = " + x2 + "<br><font color=\"red\"> The Equation Is:</font><br> " + aPrint + "(x " + x1Print + ") (x " + x2Print + ")"; } else { document.getElementById('testing').innerHTML = "<font color=\"red\"><b>YOUR INPUT PRODUCED AN ERROR:</b></font><br> You have entered a non-integer into one of the fields above, or the solution(s) for your equation is(are) an imaginary(s) number!"; } } function SolveEq() { getValues(); solveForX(); factorEq(); } |
<!-- Paste this code into the HEAD section of your HTML document. You may need to change the path of the file. --> <script type="text/javascript" src="quadEquation.js"></script> |
<!-- Paste this code into the BODY section of your HTML document --> <div align="center"> <form name="form"> <input type="text" name="x2Coef" size="2" value="1"><b> X<sup>2</sup> </b> <select name="firstSign"> <option value="+">+</option> <option value="-">-</option> </select> <input typle="text" name="xCoef" size="2" value="1"><b> X</b> <select name="secondSign"> <option value="+">+</option> <option value="-">-</option> </select> <input type="text" name="endValue" size="2"><br> Round to the nearest thousandths?<input type="checkbox" name="round">Yes<br><br> <input type="button" value="Solve!" onClick="SolveEq()"> </form> <p id="testing" style="width: 400px; height: 100px; border-width: 2px; border-style: groove; border-color: orange; font-size: 16px; color: blue; vertical-align: center">The Solution Will Appear Here!</p> </div> <p><div align="center"> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </div><p> |
UTSAVA MURTHY OF LORD SRI MALAYAPPA(VENKATESWARA) WITH SRIDEVI AND BHUDEVI
(Click on the image to view full size)
The slOka( declared in brahmAnda purAnam and varAha purAnam ) written in Telugu language that you see in the header of this page transliterated to English is:
(Click on the image to view full size)
"vEnkatAdri samam sthAnam brahmAndE nAsti kinchana,
vEnkatEsa samO dEvO na bhUtO na bhavishyati"
vEnkatEsa samO dEvO na bhUtO na bhavishyati"
which means...
"In this Universe there is no sacred place equivalent to Venkatadri(i.e.,There is no place in the whole Universe which is more auspicious than the hill Venkatachala). There is no God equivalent to Lord Venkateswara neither in the past nor in the future going to be(i.e.,There is no Archa murti (worshippable form) in all the three times (present,past and future) whose glories are comparable to the Lord of Venkatachala)"
0 comments:
Post a Comment