Problem

Write a program that reads in» positive floating-point numbers from standard input and pri...

Write a program that reads in» positive floating-point numbers from standard input and prints their geometric and harmonic means. The geometric mean of n positive numbers x1, x2, ..., xn is (x1 × x2 × ... × xn)1/n. The harmonic mean is n / (1/x1, + 1/x2 + ... + 1/xn). Hint: For the geometric mean, consider taking logarithms to avoid overflow.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1.5