A physics student gets unexpected results when using the code double force = G * mass1 *

Question:

A physics student gets unexpected results when using the code double force = G * mass1 * mass2 / r * r;

to compute values according to the formula F = Gm1m2 / r2. Explain the problem and correct the code.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: