Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Linear Algebra and Its Applications

Authors: Gilbert Strang

4th edition

30105678, 30105676, 978-0030105678

More Books

Students also viewed these Mathematics questions

Question

(a+2)=81 then a=?

Answered: 1 week ago

Question

GENERAL MANAGEMENT IN BUSINESS?

Answered: 1 week ago

Question

WHAT IS ACCOUNTING AND FUNCTIONS?

Answered: 1 week ago