// // sphere2.cpp // CSC 215 // John Rogers // // This program inputs the radius of a sphere, // computes its volume using a function, and outputs // the volume. // #include float volume(float radius) { const float pi = 3.14159; return 4.0/3.0 * radius * radius * radius * pi; } int main() { float radius; cout << "Please enter the radius of the sphere: "; cin >> radius; cout << "The sphere's volume is: " << volume(radius) << endl; return 0; }