Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: G**Md2, where G is the gravitational constant 6.67310-11,M is the mass of the earth 5.981024(in kg) and d is the distance in meters from the earth's center (stored in variable distCenter). Note: Assume distance is at least the radius of the earth.
See How to Use zyBooks for info on how our automated program grader works.
539594.3811934 qx 329.77
import java.util.Scanner;
public class GravityCalculation {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
double G =6.673e-11;
double M=5.98e24;
double accelGravity;
double distCenter;
distCenter = scnr. nextDouble () ;
I
System.out.println(accelGravity);
}
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Explain the purposes of managing performance.

Answered: 1 week ago

Question

List 4 methods to evaluate training.

Answered: 1 week ago