/* sphere4.cpp computes the weight of a spherical ball.
 *
 * Input:  The radius (feet) and 
 *           the density (pounds/cubic foot) of a spherical ball
 * Output: The weight of the sphere (pounds and tons)
 ****************************************************************/

#include <iostream.h>                 // cin, cout, <<, >>
#include <math.h>                     // pow()

int main()
{
	const double PI = 3.14159;

   cout << "Enter the radius of the spherical ball (feet): ";
   double radius;
   cin >> radius;
   cout << "Enter the density of the spherical ball (pounds/cubic feet): 
";
   double density;
   cin >> density;

   double weight = density * 4.0 * PI * pow(radius, 3) / 3.0;

   cout << "\nThe weight of the spherical ball is approximately "
        << weight << " pounds,\n"
        << "which is the same as " << weight / 2000.0 << " tons.\n";

   return 0;
}


