Guest User

Untitled

a guest
Jan 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <html>
  2.  
  3. <body>
  4.  
  5. <?php
  6.  
  7. $h = $_POST["name1"];
  8. $M = $_POST["name2"];
  9.  
  10.  
  11. $t = 1;
  12.  
  13. while ($t<$M) {
  14.  
  15. 0<=$h and $h<=100;
  16. 0<$M and $M<240;
  17.  
  18. $A = (-6 * pow($t, 4)) + ($h * pow($t, 3)) + (2 * pow($t, 2)) + $t;
  19. $t++;
  20. }
  21.  
  22. echo $A;
  23. echo "<br/>";
  24. echo $t;
  25. echo "<br/>";
  26. if ($A <= 0) {
  27. break;
  28. }
  29.  
  30.  
  31.  
  32.  
  33. echo "The balloon first touches the ground at $t hour";
  34.  
  35.  
  36. if ($t > $M) {
  37. echo "The balloon does not touch the ground during the given time";
  38. }
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. ?>
  46.  
  47. </body>
  48.  
  49. </html>
Add Comment
Please, Sign In to add comment