Question: We can calculate the surface area of a rectangular box (rectangular prism) using the length, width, and height of the box and adding up the

We can calculate the surface area of a rectangular box (rectangular prism) using the length, width, and height of the box and adding up the area of each side. The surface areas of the three different possible sides are length*width, width*height, and height*length and each side appears twice, resulting in a surface area of 2hl+2lw+2wh. To be safe, we'll add a small "fudge factor" by adding the area of the smallest side to our total. For instance, for a gift box that's 10cm high, 20cm long, and 15cm deep, the surface area would be: (2*10*20) + (2*20*15) + (2*15*10) = 400 + 600 + 300 = 1300cm of wrapping paper. The smallest side in this case is w*h, so we'll add an extra 15*10 cm of paper (150cm) for a total of 1450cm of paper. Requirements Write a program to perform the following actions: 1. Print a banner for the program when it starts up. 2. Prompt the user to enter the dimensions of the box separated by x. (For instance, our box above would be entered as 10x20x15.) 3. Split the value entered into length, width, and height, in any order. 4. Calculate the surface area of the box

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!