Question: How do you program this using basic C++ coding? Problem 2- Purpose: Find the dimensions of a tetragonal box that has the same volume as

How do you program this using basic C++ coding?

Problem 2-

Purpose: Find the dimensions of a tetragonal box that has the same volume as a cubic box when knowing the height of the tetragonal box is 1.2 times the height of the cubic box.

Input: Height of cubic box

Output: Dimensions of tetragonal box

Algorithm: -Get height of cubic box -Calulate volume of cubic box using Volume = (width)(length)(height) -Calulate height of tetragonal box by mutliplying the height of the cubic box by 1.2 -Calculate area of the base of the tetragonal box by dividing the volume of the cubic box by the height of the tetragonal box -Calculate the width and length of the tetragonal box by dividing the area of the base by 2 -Output tetragonal box's length, width, and height

Test data: Cubic box's volume = Tetragonal box's volume Tetragonal box's height = 1.2(cubic box's height)

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 Databases Questions!