Answer to Question #99401 in C++ for Caleb

Question #99401
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).
1
Expert's answer
2019-12-16T14:49:05-0500

double d;

cin>>d;

const double M =5.98e24;

const double G= 6.673e-11;

double result =(G*M)/(d*d);

cout<<result;


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS