Question: Part 2c: Create a Java program named YourName2c, so mine would be When you say you are 22 years old, you are really saying that

 Part 2c: Create a Java program named YourName2c, so mine would

Part 2c: Create a Java program named YourName2c, so mine would be When you say you are 22 years old, you are really saying that the Earth has circled the Sun 22 times. Since other planets take fewer or more days than the Earth to travel around the Sun your age would be different on other planets. You can compute how old you are on other planets by using the formula: Where x is your age on Earth, y is your age on planet Y and d is the number of Earth days the planet Y takes to revolve around the Sun. Your program needs to prompt the user for their age, and displays how old they would be on Mercury, Venus, Jupiter, and Saturn. The values for d are listed in the table below: Planet d approximate number of Earth days to travel around the Sun Mercury Venus Jupiter Saturn 225 4,380 10,767 Here is an example of the output jGRASP exec: java Enter your earth age in years: 37 You are 153.465909 0909091 years old on Mercury You are 60.022222222222226 years old on Venus You are 3.08333333 33 333335 years old on Jupiter You are 1.254295532646048 years old on Saturn jGRASP: operation complete

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!