- #1
obeying
- 8
- 0
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 * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the Earth 5.98 x 1024 (in kg) and d is the distance in meters from the Earth's center (stored in variable distCenter).
public class GravityCalculation {
public static void main (String [] args) {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity = 0.0;
double distCenter = 0.0;
distCenter = 6.38e6;
***Student code here***
System.out.println("accelGravity: " + accelGravity);
return;
}
}----------------------------------------------------------------------------------------------------------------------------------------
The answer has to compute to 9.803495445209855 however, I'm getting the answer 3.990454E14
This is how I inputted the code, did I format it wrong?
public class GravityCalculation {
public static void main (String [] args) {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity = 0.0;
double distCenter = 0.0;
distCenter = 6.38e6;
accelGravity = (G * M / distCenter * distCenter);
System.out.println("accelGravity: " + accelGravity);
return;
}
}
public class GravityCalculation {
public static void main (String [] args) {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity = 0.0;
double distCenter = 0.0;
distCenter = 6.38e6;
***Student code here***
System.out.println("accelGravity: " + accelGravity);
return;
}
}----------------------------------------------------------------------------------------------------------------------------------------
The answer has to compute to 9.803495445209855 however, I'm getting the answer 3.990454E14
This is how I inputted the code, did I format it wrong?
public class GravityCalculation {
public static void main (String [] args) {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity = 0.0;
double distCenter = 0.0;
distCenter = 6.38e6;
accelGravity = (G * M / distCenter * distCenter);
System.out.println("accelGravity: " + accelGravity);
return;
}
}