Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>WYNIK</title>
  4. <link rel="stylesheet" type="text/css" href="style.css">
  5. </head>
  6. <body>
  7. <center><code><p style="font-size: 25px;"><b>WYNIK</b></p></code></center><br>
  8. <hr><center>
  9. <?php
  10.  
  11. $lewy = ($_GET['l']);
  12. $prawy = ($_GET['p']);
  13.  
  14. $delta = $_GET['b'] * $_GET['b'] - 4 * $_GET['a'] * $_GET['c'];
  15. echo "Delta wynosi: {$delta}.<br>";
  16.  
  17.  
  18. $x = (-$_GET['b']) / (2 * $_GET['a']);
  19. echo "X wierzchołka to: {$x}.<br>";
  20.  
  21.  
  22. if($x > $lewy && $x < $prawy){
  23. $q = (pow($_GET['a'] * $x,2) + $_GET['b'] * $x + $_GET['c'] );
  24. echo "Wartość q to: $q.<br>";
  25. $x1 = ( - $_GET['b'] - sqrt($delta) ) / 2 * $_GET['a'];
  26. echo "x1 wynosi: " .$x1. ".";
  27. $x2 = ( - $_GET['b'] + sqrt($delta) ) / 2 * $_GET['a'];
  28. echo "x2 wynosi: " .$x2. ".";
  29. }
  30.  
  31. ?> </center>
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement