Question: ( 1 ) Ask the user to enter 4 numbers, being 4 people's heights. Store the numbers in an array of doubles. Output the array's

(1) Ask the user to enter 4 numbers, being 4 people's heights. Store the numbers in an array of doubles. Output the array's numbers on one line, each number followed by one space. (2 pts)
Ex:
Enter height 1: 5.4 Enter height2: 6.3 Enter height3: 5.7 Enter height4: 6.2 You entered:5.46.35.76.2
(2) Also output the total height, by summing the array's elements. (1 pt)
(3) Also output the average of the array's elements. (1 pt)
(4) Also output the max array element. (2 pts)
Ex:
Enter height1: 5.4 Enter height2: 6.3 Enter height3: 5.7 Enter height4: 6.2 You entered:5.46.35.76.2 Total height:23.6 Average height:5.9 Max height:6.3

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!