Question
Can you please fix the errors using C++ #include #include using namespace std; const double Pi= 3.14159; //Declare Proto types double ComputeBaseArea(double r); double ComputeVol(double
Can you please fix the errors using C++
#include
#include
using namespace std;
const double Pi= 3.14159;
//Declare Proto types
double ComputeBaseArea(double r);
double ComputeVol(double r, double h);
double ComputeSA(double r);
double ComputeTotArea(double r);
void PrintD(double R, double H,double Ba, double V, double SA);
int main() // moluar program
{
//declare Varibles
double rad, height, BaseArea, Volume, SurfaceArea, TotalArea;
//Promt user for radious and height
cout\"please>
cin>>rad;
cout\"please>
cin>>height;
// compute Area, Volume, height, BaseArea, SurfaceArea, Total Area
ComputeBaseArea(rad);
ComputeSA(rad,height);
ComputeTotArea(rad,height);
ComputeVol(rad,height);
// print data to screen
cout\"restults:>
}
// compute data
double ComputeBaseArea(double r)
{
double BA;
BA= Pi*pow(r,2);
return BA;
}
double ComputeSA(double r,double h)
{
double CA;
CA=2*Pi*r*h;
return CA;
}
double ComputeTotArea(double r,double h)
{
double TA;
TA=2*Pi*r*h+2*Pi*pow(r,2);
return TA;
}
double ComputeVol(double r, double h)
{
double Vol;
Vol=ComputeBaseArea(r)*h;
return Vol;
}
// print the Data
void PrintD(double R, double H,double Ba, double V, double SA)
{
cout\"radious>
cout\"height>
cout
cout
}\">\"base>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started