the volume of a pyramid, Mathematics

Assignment Help:

Write a script to determine the volume of a pyramid, which is 1/3 * base * height, where the base is length * width.  On time the user to enter values for the length, width, and the height and then determine the volume of the pyramid.  When the user enters every value, they will then be prompted also for either 'i' for inches, or 'c' for centimeters. (Note 2.54 cm = 1 inch).  Your script should print the volume in cubic inches with 3 decimal places.  As an instance, the output might look like this:

 

This script will calculate the volume of a pyramid.

Enter the length of the base: 50

Is that i or c? i

Enter the width of the base: 6

Is that i or c? c

Enter the height: 4

Is that i or c? i

The volume of the pyramid is xxx.xxx cubic inches.

 


Related Discussions:- the volume of a pyramid

Find the coordinates of the other two vertices, The two opposite vertices o...

The two opposite vertices of a square are (-1, 2) and (3, 2). Find the coordinates of the other two vertices.

Problem solving, compare 643,251;633,512; and 633,893. The answer is 633,51...

compare 643,251;633,512; and 633,893. The answer is 633,512

Prove the equality of axiom choice, (1) Prove that Zorn's lemma is equivale...

(1) Prove that Zorn's lemma is equivalent to axiom of choice. (2) Use Zorn's Lemma to prove the existence of E.

Find the perameter of square in maths, Find the perameter of SQUARE in math...

Find the perameter of SQUARE in maths? Remember that in a square, all sides are of equal length. A square is also a kind of rectangle. So, you can use length (l) times width

Proof of various integral facts- formulas, PROOF OF VARIOUS INTEGRAL FACTS/...

PROOF OF VARIOUS INTEGRAL FACTS/FORMULAS/PROPERTIES In this section we've found the proof of several of the properties we saw in the Integrals section and also a couple from t

Developing an understanding ones tens and more, DEVELOPING AN UNDERSTANDING...

DEVELOPING AN UNDERSTANDING :  The other day I was showing the children's book '203 Cats' to my 7-year-old niece. She had recently learnt how to write large numerals in her school

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd