Created
February 29, 2024 18:03
-
-
Save alex-ber/ad9947b6206cdece7c5b5304da45fa35 to your computer and use it in GitHub Desktop.
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
public static void main(String[] args) { | |
double earthWeight = Double.parseDouble(args[0]); | |
double mass = earthWeight/EARTH.surfaceGravity(); | |
for (Planet p : Planet.values()) | |
System.out.printf("Your weight on %s is %f%n", | |
p, p.surfaceWeight(mass)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment