Question
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
#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((crateLength 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 }
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