This is a gravitational_Calculator with a litle test first,
to check that you do have javascript working

: by John Walker

Okey, so here comes the code for shaping his calculator.

(   I'm sorry, but i've shortened the code somewhat,
    to keep it as simple /easily read as possible.            )
 
 

 (:      He uses his java to illustrate how two masses interact with each_other.
          Then he try to give an impression of this force by giving us an example
                  of how much this force would be expressed as a weight                             :)
 
 
first thy java_test.
:)

And now the rest of the Code.
Given:
Mass 1: m' grams
Mass 2: m'grams
Distance: r centimetres

Gravitational force: Fdyne

Since we don't encounter forces in dynes on an everyday basis,
not to mention small fractions of a dyne.

We will express this force in terms of the weight of something one can visualise.

We can calculate the mass of an object from its weight at the Earth's surface merely by solving the gravitational force equation above for m and plugging in the Earth's mass.
 

me = 5.9736×1027 grams, and the Earth's equatorial radius, re = 6.37814×108 cm:

 
The value below is the mass of an object whose weight
at the Earth's surface         equals
the gravitational force displayed in the box above.

This value is automatically updated when you press the "Calculate" button.

Equivalent mass: grams
 

Aint it nice. :)

  Back, that is..