Server IP : 172.16.15.8 / Your IP : 3.147.65.111 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/inieves/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- quadraticSolver.php --> <HTML> <BODY style="background-color:black; color:gold; font-family:algerian;"> <CENTER> <H2 style="color:gold; font-size:200%; border:2px; border-style:solid; border-color:gold;"> Answer Page </H2> <P> <P> <?php //Calculations in PHP $a = $_POST['aVar']; $b = $_POST['bVar']; $c = $_POST['cVar']; $quad = $b * $b - 4. * $a * $c; if ($quad > 0) { $root1 = (-$b + sqrt($quad)) / (2. * $a); $root2 = (-$b - sqrt($quad)) / (2. * $a); $ans1 = number_format($root1, 1); $ans2 = number_format($root2, 1); print "The answers are $ans1 and $ans2"; } else if ($quad == 0) { $root1 = (-$b + sqrt($quad)) / (2. * $a); $ans1 = number_format($root1, 1); print "The answer is $ans1"; } else print "No solution." ?> </CENTER> </BODY> </HTML>