// sum of volume and mass of spheres #include #include using namespace std; // function declaration (implementation in sphere.cpp) double mass(double r, double rho); double volume(double r); // main function const double r1=1.; // radius of first sphere const double r2=3.; // radius of second sphere const double rho=7.87; // density int main() { double volume_sum = volume(r1) + volume(r2); cout << volume_sum << endl; // sum of volume double mass_sum = mass(r1, rho) + mass(r2, rho); cout << mass_sum << endl; // sum of mass }