#include using namespace std; double const G = 6.673E-8; double gravity(double mass1_par, double mass2_par, double distance_par); int main() { double mass_1, mass_2, distance; char again; double force; do { cout << "What is the mass of the first object in grams?" << endl; cin >> mass_1; cout << "The first object is " << mass_1 << " g." << endl; cout << "What is the mass of the second object in grams?" << endl; cin >> mass_2; cout << "The second object is " << mass_2 << " g." << endl; cout << "What is the distance between the two objects in centimeters?" << endl; cin >> distance; cout << "The distance between the two obejects is " << distance << " cm." << endl; force = gravity(mass_1, mass_2, distance); cout << "The force due to gravity is " << force << " dyne." << endl; cout << " Would you like to make another calculation? Y= yes N= no" << endl; cin >> again; } while ((again == 'y') || (again == 'Y')); return 0; } double gravity(double mass1_par, double mass2_par, double distance_par) { return ((G * mass1_par * mass2_par) / (distance_par*distance_par)); }