Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started