We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Boxes through a Tunnel
Boxes through a Tunnel
Sort by
recency
|
156 Discussions
|
Please Login in order to post a comment
int get_volume(box b) { /** * Return the volume of the box */ return b.height * b.length * b.width; }
int is_lower_than_max_height(box b) { /** * Return 1 if the box's height is lower than MAX_HEIGHT and 0 otherwise */ return (b.height<41)? 1 : 0; }
Here is my solution:
struct box { int length, width, height; };
typedef struct box box;
int get_volume(box b) {
}
int is_lower_than_max_height(box b) {
}