// program whick ask the density and the radius of a sphere // and print the volume and the mass or the sphere #include #include using std::cout; using std::endl; using std::cin; int main() { double PI = 3.14159; cout << "Radius of the sphere (m): "; double radius; cin >> radius; cout << "Density (Kg/metro cubo): "; double density; cin >> density; double volume = 4./3.*PI*pow(radius,3); double mass = density * volume; cout << " The volume of the sphere is : " << volume << endl; cout << " The mass of the sphere is : " << mass << endl; return 0; }