Created
February 29, 2024 17:48
-
-
Save alex-ber/094836660aa8fe6c6059be318a595741 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