Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Trying to get this part with my coding. Posting this question again since it wasn't properly answered. Here is my current code on it #include

Trying to get this part with my coding. Posting this question again since it wasn't properly answered. Here is my current code on it

image text in transcribed

#include #include #include #include #include

using namespace std;

#define MIN_CRATE 1 // Minimum size a shipping crate can be (in feet) #define MAX_CRATE 5 // Maximum size a shipping crate can be (in feet) #define MIN_ROOM 10 // Minimum size a storage room can be (in feet) #define MAX_ROOM 100 // Maximum size a storage room can be (in feet) #define S_CRATE_RATE 2.50 // Cost to ship crate 1-40 cubic feet #define M_CRATE_RATE 3.00 // Cost to ship crate 40-80 cubic feet #define L_CRATE_RATE 3.50 // Cost to ship crate 80+ cubic feet #define S_ROOM_RATE 0.12 // Cost to ship in room 1,000-250,000 cubic feet #define M_ROOM_RATE 0.09 // Cost to ship in room 250,000-500,000 cubic feet #define L_ROOM_RATE 0.07 // Cost to ship in room 500,000-750,000 cubic feet #define XL_ROOM_RATE 0.05 // Cost to ship in room 750,000+ cubic feet

int main() { double crateLength,crateWidth,crateHeight,spaceLength,spaceWidth,spaceHeight,crateVolume,spaceVolume,crateSurfaceArea,spaceSurfaceArea,crateDiagonal,spaceDiagonal,storageSpace,room; cout >crateLength; if((crateLengthMAX_CRATE)) { cout>crateWidth; if((crateWidthMAX_CRATE)) { cout> crateHeight; if((crateHeightMAX_CRATE)) { cout > spaceLength; if((crateLengthMAX_CRATE)) { cout >spaceWidth; if((crateWidthMAX_CRATE)) { cout>spaceHeight; if((crateHeightMAX_CRATE)) { cout

crateVolume=crateLength*crateWidth*crateHeight; if(crateVolume

spaceVolume=spaceLength*spaceWidth*spaceHeight; if(spaceVolume

crateSurfaceArea=(crateWidth*crateLength+crateHeight*crateLength+crateWidth*crateHeight)*2; spaceSurfaceArea=(spaceWidth*spaceLength+spaceHeight*spaceLength+spaceWidth*spaceHeight)*2 ; crateDiagonal=crateLength*crateLength+crateWidth*crateWidth+crateHeight*crateHeight; crateDiagonal=sqrt(crateDiagonal); spaceDiagonal=spaceLength*spaceLength+spaceWidth*spaceWidth+spaceHeight*spaceHeight; spaceDiagonal=sqrt(spaceDiagonal); storageSpace=(spaceLength/crateLength)*(spaceWidth/crateWidth)*(spaceHeight/crateHeight);

for(int i=0;i

}

294 crates can fit in the storage space. Crate volume 12.000000 cost.. Price to ship 294 crates.. Storage rooms with volume 4500.000000 cost. 4500.000000 cubic feet storage room cost. $2.50 per crate $735.00 $0.12 per cubic foot $540.00 Total cost. $1275.00 294 crates can fit in the storage space. Crate volume 12.000000 cost.. Price to ship 294 crates.. Storage rooms with volume 4500.000000 cost. 4500.000000 cubic feet storage room cost. $2.50 per crate $735.00 $0.12 per cubic foot $540.00 Total cost. $1275.00

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_2

Step: 3

blur-text-image_3

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions