Created
April 16, 2015 19:45
-
-
Save jonathan-irvin/72c8f57de189216db792 to your computer and use it in GitHub Desktop.
Geometric Mean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class geoMean { | |
public static void main(String[] args) { | |
System.out.print("Enter number 1: "); | |
Scanner intInput = new Scanner (System.in); | |
double number1 = intInput.nextDouble(); | |
System.out.print("Enter number 2: "); | |
double number2 = intInput.nextDouble(); | |
System.out.println("The geometric mean is "+Math.sqrt(number1 * number2)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment