Question: Overview For this assignment, write a C + + program to calculate and display the gravitational force between two objects. Basic Program Logic The first

Overview
For this assignment, write a C++ program to calculate and display the gravitational force between two objects.
Basic Program Logic
The first thing to do in the program is to create any variables that are needed to hold/save information for the program. To determine how many variables are needed, think about the information that will be entered by someone using the program and whether it is important for that information to be saved. Think about any calculations that will be performed by the program and whether the results of the calculations need to be saved. To determine the data type for the variables, think about what values someone using the program will be entering or what kind of results will be produced by any calculations. (Note: to ease into writing this first program, the data type for the variables has been specified below.)
Ask the user of the program for the mass (in kilograms) of the first object. This value should be saved in a float or double variable.
Ask the user of the program for the mass (in kilograms) of the second object. This value should be saved in a float or double variable.
Ask the user of the program for the distance (in meters) between the two objects. This value should be saved in a float or double variable.
Use the three variables from above to calculate the gravitational force between the two objects (formula follows). Depending on how the code is written, if the calculated gravitational force is saved in a variable, it should be type float or double.
 Overview For this assignment, write a C++ program to calculate and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!