Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // ALGORITHME
- function max2($a, $b) {
- if ($a > $b) {
- return $a;
- } else {
- return $b;
- }
- }
- // TESTS
- echo max2(2, 5)."\n";
- echo max2(-2, -5)."\n";
- echo max2(2.1, 2.5)."\n";
- echo max2("bar", "foo")."\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement