Question
Asked by:
JavaDummy25
JavaDummy25
Rating : No Rating
Questions Asked: 27
Tutorials Posted: 0
 

$5.00 C++ help

Q:

So here is what I have:

  • Uses double precision floating point variables
  • Reads the masses of the two objects as input from the user
  • Reads the distance between these two objects as input from the user
  • Calculates the gravitational force between these objects
  • Displays all data using the format given in the following sample output, which meet the following specifications:

ü  The masses and distance should be displayed in fixed format, carried out to 2 decimal places.  Their decimals should line up. 

ü  The gravitational constant and gravitational force should be displayed in scientific format, carried out to 4 decimal places.  Their decimals should line up.

ü  All unit values should line up.

 

Now I am using the following:

m1 is the mass of an object, in kilograms

m2 is the mass of another object, in kilograms

r2 is the square of the distance between the gravity centers of the two objects, in meters

G is the gravitational constant with a value of 6.6742 × 10-11 in Newton meters2 per kilograms2

F is the gravitational force measured in Newtons

I understand that this is pretty basic, but I cannot seem to get the right numbers to come out.  Help!

 

 

 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
 

$5.00 A+ solution

  • This tutorial hasn't been purchased yet.
  • Posted on Nov 02, 2009 at 11:17:04PM
A:
Preview: ... the ...

The full tutorial is about 4 words long plus attachments.

Attachments:
forces.cpp (0K)
Posted by:
manojatl
manojatl
Rating (10): B-
Questions Asked: 0
Tutorials Posted: 49, earned $179.17
 

$4.00 Successfully compiled and tested source code

  • This tutorial was purchased 1 time and rated A+ by students like you.
  • Posted on Nov. 03, 2009 at 12:26:02AM
A:
Preview: ... ce code ...

The full tutorial is about 5 words long plus attachments and additional clarificationclarifications added later.

Attachments:
Force.cpp (1K)
Force.JPG (39K) (Preview)
Posted by:
ashishkshwh
ashishkshwh
Rating (19): A+
Questions Asked: 0
Tutorials Posted: 131, earned $231.37
 

$5.00 here is your solution...

  • This tutorial hasn't been purchased yet.
  • Posted on Nov. 05, 2009 at 11:46:00AM
A:
Preview: ... the .cpp ...

The full tutorial is about 7 words long plus attachments.

Attachments:
finalAssigncpp.cpp (1K)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty