Question: c++ Define the following modular functions: CalcConeBaseArea() takes one double parameter as a cone's radius. The function returns the area of the cone's base as

c++

Define the following modular functions: CalcConeBaseArea() takes one double parameter as a cone's radius. The function returns the area of the cone's base as a double. The area of the base is calculated by: CalcConeVolume() takes two double parameters as a cone's radius and height. The function returns the cone's volume as a double, using the CalcConeBaseArea() function. The volume is calculated by: Ex: If userRadius is 4.0 and userHeight is 3.0, then the output is: Base area: 50.3 Volume: 50.3 Note: Use M_PI for .

#include #include #include using namespace std;

/* Your code goes here */

int main() { double userRadius; double userHeight; cin >> userRadius; cin >> userHeight;

cout << fixed << setprecision(1);

cout << "Base area: "; cout << CalcConeBaseArea(userRadius) << endl;

cout << "Volume: "; cout << CalcConeVolume(userRadius, userHeight) << endl; return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!