Answer:
<?php
function MinMax($x,$y) {
if($x > $y){
echo("The minimum is ".$y." and the maximum number is ".$x);
}
else{
echo("The minimum is ".$x." and the maximum number is ".$y);
}
}
MinMax(20,4);
?>
Step-by-step explanation:
<?php
This defines the user function with two parameters x and y
function MinMax($x,$y) {
This checks if parameter x is greater than parameter y
if($x > $y){
If yes, it prints x as the maximum and y as the minimum
echo("The minimum is ".$y." and the maximum number is ".$x);
}
If otherwised
else{
If yes, it prints y as the maximum and x as the minimum
echo("The minimum is ".$x." and the maximum number is ".$y);
}
}
This calls the function
MinMax(20,4);
?>