Question: . Open mileage - array.php and you will see that the code already declares an array that contains the mileage for 2 0 trips. Use
Open mileagearray.php and you will see that the code already declares an array that contains the
mileage for trips. Use a FOR loop to process this array one element at a time as follows: accumulate
the total mileage for all the trips $totalMiles; determine the highest value in the array $longestTrip;
find the lowest value in the array $shortestTrip; count the number of array elements where the
mileage is or higher $longTrips Also calculate the average of the mileage values. Use the
sizeof function to control the loop and to calculate the average. A print statement to print the results is
provided and does not need to be changed but be sure your variable names match those used in the
print statement.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
