Advertisement
Guest User

Sławicki

a guest
Oct 16th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Zadanie </title>
  5. <link rel="stylesheet" type="text/css" href="style.css">
  6. <meta charset="utf-8">
  7. </head>
  8. <body>
  9. <div class="zadanie ">
  10. <form method="post">
  11. <h1>Podaj Liczbe<h1/><br/>
  12. <h2>A</h2>:<input type="text" name="a" value="0"/><br/>
  13. <h2>B</h2>:<input type="text" name="a" value="0"/><br/>
  14. <input type="submit" name="wyslij" value="Oblicz"/>
  15. </form>
  16. <?php
  17. $A = $_POST['A'];
  18. $B = $_POST['B'];
  19.  
  20. if($b>$a)
  21. {
  22. echo 'Wynik zadanie:';
  23.  
  24.  
  25. }
  26. for(;$A<=$B;$A++)
  27. {
  28. echo $A.'<br>';
  29. }
  30. else{
  31. echo 'B nie moze byc miejsze od A';
  32. }
  33. ?>
  34. </div>
  35.  
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement