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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started