Newton’s Law says that the force, F, between two bodies of masses M1 and M2 is given by
f=k(m1,m2/d^2)
Where k is the gravitational constant and d is the distance between the bodies. The value of k is approximately 6.67 x 10-8 dyn.cm2/g2. Write a program that prompts the user to input the masses of the bodies and the distance between the bodies. The program then outputs the force between the bodies.
NOTE: You are required to use the in-built methods of the Math class.
dizzymrswagg 0 Newbie Poster
Moschops 683 Practically a Master Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.