Define a function CalcPyramidVolume() with double data type parameters baseLength, baseWidth, and pyramidHeight, that return as a double the volume of a pyramid with a rectangular base....


Define a function CalcPyramidVolume() with double data type parameters baseLength, baseWidth, and pyramidHeight, that return<br>as a double the volume of a pyramid with a rectangular base. CalcPyramidVolume() calls the given CalcBaseArea(0 function in the<br>calculation.<br>Relevant geometry equations:<br>Volume = base area x height x 1/3<br>(Watch out for integer division).<br>345154 2174782.ax3zav7<br>1 #include <iostream><br>2 using namespace std;<br>3<br>4 double CalcBaseArea(double baseLength, double baseWidth) {<br>return baseLength * baseWidth;<br>6 }<br>7<br>8 int main() {<br>double userLength;<br>double userWidth;<br>double userHeight;<br>9.<br>10<br>11<br>12<br>cin >> userLength;<br>cin >> userWidth;<br>cin >> userHeight;<br>13<br>14<br>15<br>Run<br>X Testing with inputs: 1.00 1.00 1.00<br>MacBook Pro<br>

Extracted text: Define a function CalcPyramidVolume() with double data type parameters baseLength, baseWidth, and pyramidHeight, that return as a double the volume of a pyramid with a rectangular base. CalcPyramidVolume() calls the given CalcBaseArea(0 function in the calculation. Relevant geometry equations: Volume = base area x height x 1/3 (Watch out for integer division). 345154 2174782.ax3zav7 1 #include 2 using namespace std; 3 4 double CalcBaseArea(double baseLength, double baseWidth) { return baseLength * baseWidth; 6 } 7 8 int main() { double userLength; double userWidth; double userHeight; 9. 10 11 12 cin >> userLength; cin >> userWidth; cin >> userHeight; 13 14 15 Run X Testing with inputs: 1.00 1.00 1.00 MacBook Pro

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here