Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions