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.
structbox{/** * Define three fields of type int: length, width and height */intlength;intwidth;intheight;};typedefstructboxbox;intget_volume(boxb){/** * Return the volume of the box */return((b.height)*(b.length)*(b.width));}intis_lower_than_max_height(boxb){/** * Return 1 if the box's height is lower than MAX_HEIGHT and 0 otherwise */if(b.height<MAX_HEIGHT)return1;elsereturn0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Boxes through a Tunnel
You are viewing a single comment's thread. Return to all comments →
Here is my solution: