83 118
Assignments Done
99,3%
Successfully Done
In February 2020

Answer to Question #2702 in Action Script | Flash | Flex | ColdFusion for pawan deep

Question #2702
Write overloaded prototypes of volumes(), a function that returns volumes of different structures.&lt;br&gt;Write three versions: &lt;br&gt;one for cube&#039;s volume that takes one float side of the cube,&lt;br&gt;one for cylinder&#039;s volume takes float radius and float height of the cylinder, &lt;br&gt;and one rectangular box&#039;s volume that takes float length ,float breadth and float height of the box.
1
2011-05-23T10:04:49-0400
#include <iostream>
#include <math.h>
using namespace std;

// The volume of the cube with the given side
double volume(const float side);

// The volume of the cylinder with the fiven radius and height
double volume(const float radius, const float height);

// The volume of the rectangular box's volume
double volume(const float length, const float breadth, const float height);

int main()
{
return 0;
}

// The volume of the cube with the given side
double volume(const float side)
{
return pow(side, 3);
}

// The volume of the cylinder with the fiven radius and height
double volume(const float radius, const float height)
{
return 3,1415926535898 * pow(radius, 2) * height;
}

// The volume of the rectangular box's volume
double volume(const float length, const float breadth, const float height)
{
return length * breadth * height;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!