Write a method called average()
that calculates the average of three numbers. Recall that an average is calculated by adding a group of...
X941: Writing a Method 3
Write a method called average()
that calculates the average of three numbers.
Recall that an average is calculated by adding a group of numbers and then dividing by the the size of the group.
Your method will need to be named average
and will need to return a double
. It will need to take three double
arguments as parameters and return the average (the sum of all three numbers divided by the number of numbers - or 3 in this case).
Your Answer:
Feedback
Your feedback will appear here when you check your answer.