Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions