// sphere.cpp : functions for properties of sphere #include #include #include "sphere.h" // include header file using namespace std; const double pi = 3.1416; // function implementations double mass(double r, double rho) { return rho * volume(r); } double volume(double r) { const double pi = 3.1416; return 4./3. * pi * pow(r, 3.); }