Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. function getSum($first, $second)
  5. {
  6.     $sum = $first+ $second;
  7.     $result = $sum;
  8.     return $sum;
  9. }
  10.  
  11. function getDif($first, $second)
  12. {
  13.  
  14.     $dif = $first - $second;
  15.     $result = $dif;
  16.     return $dif;
  17. }
  18.  
  19. function getProd ($firsr, $second)
  20. {
  21.  
  22.     $product = $first * $second;
  23.     $result = $product;
  24.     return $product;
  25. }
  26.  
  27. function getDiv ($first, $second)
  28. {
  29.     $div = $first / $second;
  30.     $result = $div;
  31.     return $div;
  32. }
  33.  
  34. function getMax ($first, $second)
  35. {
  36.     if($first< $second)
  37.     {
  38.         $max = $second;
  39.     }
  40.     else
  41.     {
  42.         $max = $first;
  43.     }
  44.     $result = $max;
  45.     return $max;
  46. }
  47.  
  48. function getMin ($first, $second)
  49. {
  50.  
  51.     if($first < $second)
  52.     {
  53.         $min = $first;
  54.     }
  55.     else
  56.     {
  57.         $min = $second;
  58.     }
  59.     $result = $min;
  60.     return $min;
  61. }
  62. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement