Suppose that we want to compute the geometric mean of a list of positive values. To compute

Question:

Suppose that we want to compute the geometric mean of a list of positive values. To compute the geometric mean of k values, multiply them all together and then compute the kth root of the value. For example, the geometric mean of 2, 5, and 7 is 3√2 × 5 × 7. Use a loop with a sentinel value to allow a user to enter an arbitrary number of values. Compute and display the geometric mean of all the values, excluding the sentinel. Math.pow(x, 1.0/k) will compute the kth root of x.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: