Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>WYNIK</title>
- <link rel="stylesheet" type="text/css" href="style.css">
- </head>
- <body>
- <center><code><p style="font-size: 25px;"><b>WYNIK</b></p></code></center><br>
- <hr><center>
- <?php
- $lewy = ($_GET['l']);
- $prawy = ($_GET['p']);
- $delta = $_GET['b'] * $_GET['b'] - 4 * $_GET['a'] * $_GET['c'];
- echo "Delta wynosi: {$delta}.<br>";
- $x = (-$_GET['b']) / (2 * $_GET['a']);
- echo "X wierzchołka to: {$x}.<br>";
- if($x > $lewy && $x < $prawy){
- $q = (pow($_GET['a'] * $x,2) + $_GET['b'] * $x + $_GET['c'] );
- echo "Wartość q to: $q.<br>";
- $x1 = ( - $_GET['b'] - sqrt($delta) ) / 2 * $_GET['a'];
- echo "x1 wynosi: " .$x1. ".";
- $x2 = ( - $_GET['b'] + sqrt($delta) ) / 2 * $_GET['a'];
- echo "x2 wynosi: " .$x2. ".";
- }
- ?> </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement