#include #include // Needed for M_PI and pow() using namespace std; double volume_of_sphere( double r ) { return( 4.0 * M_PI * pow( r, 3 ) / 3.0 ); } int main() { double radius, volume; // cout.precision() is used to set the number of significant // digits that are displayed cout.precision( 10 ); cout << "Enter the radius of your sphere: "; cin >> radius; volume = volume_of_sphere( radius ); cout << "\nThe volume of your sphere is " << volume << endl; cout << "\n\n"; system( "PAUSE" ); return( 0 ); }