How to write a C program of two bodies exerting a gravitational force on each other?
I 've been set the following problem and don't have a clue how to start any help would be much appreciated.

    In 2-D, read in the initial positions, velocities and masses of two bodies (suns,stars etc) . You will need to define suitable units for these. Then using the gravitational equation, calculate the force on each body from the other, and use Newton’s 3rd law to calculate the acceleration of that body. Generate a file with the positions of both bodies at each timestep for a long time period. Use this file to plot the paths of the two bodies.


How to write a C program of two bodies exerting a gravitational force on each other?
===

I 've been set the following problem and don't have a clue how to start any help would be much appreciated.

    In 2-D, read in the initial positions, velocities and masses of two bodies (suns,stars etc) . You will need to define suitable units for these. Then using the gravitational equation, calculate the force on each body from the other, and use Newton’s 3rd law to calculate the acceleration of that body. Generate a file with the positions of both bodies at each timestep for a long time period. Use this file to plot the paths of the two bodies.

