Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Instructor note: While you will be submitting this assignment through Zybooks, make sure you are still applying appropriate formatting and in-line commenting

Instructor note: While you will be submitting this assignment through Zybooks, make sure you are still applying appropriate formatting and in-line commenting

Computer Science

Instructor note:

While you will be submitting this assignment through Zybooks, make sure you are still applying appropriate formatting and in-line commenting.

(1) Prompt the user to enter five numbers, being five people's weights. 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 weight 1: 236Enter weight 2: 89.5Enter weight 3: 142Enter weight 4: 166.3Enter weight 5: 93You entered: 236.0 89.5 142.0 166.3 93.0

(2) Also output the total weight, 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 weight 1: 236Enter weight 2: 89.5Enter weight 3: 142Enter weight 4: 166.3Enter weight 5: 93You entered: 236.0 89.5 142.0 166.3 93.0Total weight: 726.8Average weight: 145.35999999999999Max weight: 236.0

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions