Question: java efine a method printResult ( ) that has two double parameters, and outputs Average: followed by the parameters' average with a precision of
java efine a method printResult that has two double parameters, and outputs "Average: followed by the parameters' average with a precision of two digits as follows. End with a newline. printResult should not return any value.
Ex: If the input is then the output is:
Average:
Note:
The calculation to find the average of two values x and y is x y
System.out.printff myDouble outputs doubles with a precision of two digits.
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
