Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions