Question: Write a REAL function in Fortran to calculate the gravitational force f between two bodies of masses m 1 and m 2 . The formula

Write a REAL function in Fortran to calculate the gravitational force f between
two bodies of masses m1 and m2. The formula gives the force due to gravity:
f=Gm1m2r2
Where:
G is the gravitational constant, G=6.67310-11(in m3kg*s2m3kg*s2),
r is the distance (in meters) between the two bodies,
m1 and m2 are the masses of the two bodies (in kilograms).
You should define G as a parameter in your program.
Additionally, develop a main program that prompts the user to input the masses
of the two bodies and the distance between them. Your main program should call
the function to calculate the gravitational force f and print the result.
 Write a REAL function in Fortran to calculate the gravitational force

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!