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 between
two bodies of masses and The formula gives the force due to gravity:
Where:
is the gravitational constant, in
is the distance in meters between the two bodies,
and are the masses of the two bodies in kilograms
You should define 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 and print the result.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
