Question: Create an indexed array named $numbers containing the values [ 1 0 , 4 0 , 5 0 , 1 0 0 , 8 0

Create an indexed array named $numbers containing the values [10,40,50,100,80,90,30,60] Calculate and print the sum of all elements in the array. Calculate and print the average of all elements in the array. Sort the array in ascending order. Sort the array in descending order. Reverse the order of elements in the array and print the reversed array.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!