Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1.     function largest($first, $second, $third) {
  2.       $output = $first;
  3.       if ($second > $output) {
  4.         $output = $second;
  5.       }
  6.       if ($third > $output) {
  7.         $output = $third;
  8.       }
  9.      
  10.       return $output;
  11.     }
  12.    
  13.     function smallest($first, $second, $third) {
  14.       $output = $first;
  15.       if ($second < $output) {
  16.         $output = $second;
  17.       }
  18.       if ($third < $output) {
  19.         $output = $third;
  20.       }
  21.      
  22.       return $output;
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement