Question: Write a PHP program that uses a function named High_Low that given an array of positive integers returns the Highest and Lowest values in the
Write a PHP program that uses a function named High_Low that given an array of positive integers returns the Highest and Lowest values in the array. Use Pass by Reference for the $high and $low variables in the function. See the tutorial above for more information about passing arguments to a function by reference.
This is the Main Program:
$numbers = array(56, 23, 12, 78, 11, 30, 96, 45, 67, 33); $high = -INF; // The lowest possible number $low = INF; //INF is a predefined PHP constant for Infinity
High_Low($numbers, $high, $low);
echo "The highest number is " . $high . " "; echo "The lowest number is " . $low . " ";
please give code without html
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
