Advertisement
Guest User

xxx

a guest
Oct 10th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. function olvas ()
  3. { echo'<form name="urlap" action=" " method="post">';
  4. echo'a=<input name="szam1" type="number"><br>';
  5. echo'<br>';
  6. echo'b=<input name="szam2" type="number"><br>';
  7. echo'<br>';
  8. echo'<input name="gomb" type="submit" value="Mehet">';
  9. echo'</form>';
  10. $a= $_POST["szam1"];
  11. $b= $_POST["szam2"];
  12. $s= $a+$b;
  13. $e= $a-$b;
  14. $t= $a*$b;
  15. $d= $a/$b;
  16. $r= $a%$b;
  17. echo"a=$a<br>";
  18. echo"b=$b<br>";
  19. echo"osszeg=$s<br>";
  20. echo"kivonas=$e<br>";
  21. echo"szorzas=$t<br>";
  22. echo"osztas=$d<br>";
  23. echo"osztasi maradek=$r<br>";
  24. }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement