Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- is_numeric($first);
- is_numeric($second);
- function getSum($first, $second)
- {
- $sum = $first+ $second;
- $result = $sum;
- return $sum;
- }
- function getDif($first, $second)
- {
- $dif = $first - $second;
- $result = $dif;
- return $dif;
- }
- function getProd ($firsr, $second)
- {
- $product = $first * $second;
- $result = $product;
- return $product;
- }
- function getDiv ($first, $second)
- {
- $div = $first / $second;
- $result = $div;
- return $div;
- }
- function getMax ($first, $second)
- {
- if($first< $second)
- {
- $max = $second;
- }
- else
- {
- $max = $first;
- }
- $result = $max;
- return $max;
- }
- function getMin ($first, $second)
- {
- if($first < $second)
- {
- $min = $first;
- }
- else
- {
- $min = $second;
- }
- $result = $min;
- return $min;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement