Question: Write a program that computes the Geometric Mean of 3 real numbers. Suppose the first number is represented by (n1), the second by (n2), and

Write a program that computes the Geometric Mean of 3 real numbers. Suppose the first number is represented by (n1), the second by (n2), and the third by (n3). The Geometric mean is 3 n1 n2 n3. Your program should ask the user to enter n and the number and test if all numbers are greater the zero. If they are all valid, print the Geometric mean. If one or more values are invalid, print the message Invalid input and leave the program. Note: You can use a **(1/3) to compute 3 a. Run your program with the following input and include a print screen of your output on your submission.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!