The program is:

!find the force of gravity at earth surface

!force, f = GMm/r^2 = ma, a= GM/r^2 ; at r=r_earth a=g_earth

 

LET G=6.6732e-11 ! m^3 kg^-1 s^-2

LET M_earth=5.976e24 ! kg

LET m_unit=1 ! kg

LET r_earth=6.3782e6 ! meters

LET g_earth = G*M_earth/(r_earth*r_earth)

!acceleration = f/m = g = m s^-2 = Newtons kg^-1

PRINT "The acceleration of gravity at the earth surface g_earth is ..."

! acceleration of gravity at surface of earth

SET COLOR "red"

PRINT g_earth;" ";"m/s^2"

SET COLOR "black"

PRINT "G","M_earth","m_unit","r_earth"

SET COLOR "green"

PRINT "m^3/kg s^2","kg", "kg", "meters"

SET COLOR "blue"

PRINT G,M_earth,m_unit,r_earth

END

The output is:

The acceleration of gravity at the earth surface g_earth is ...

9.80276 m/s^2

G M_earth m_unit r_earth

m^3/kg s^2 kg kg meters

6.6732e-11 5.976e+24 1 6378200