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

Which state sold corsica to france in 1768, By which of those ancient civil...

By which of those ancient civilizations was Machu Pichu built? The Aztecs The Egyptians The Mayas The Incas Which state sold Corsica to France in 1768? - Not answered Genoa Veni

Find the length of the second diagonal, Find the length of the second diago...

Find the length of the second diagonal of a rhombus, whose side is 5cm and one of the diagonals is 6cm.

Static or dynamic, Consider a discrete-time system that is characterized by...

Consider a discrete-time system that is characterized by the following difference equation: Y(n) = x(n)cos? 0 n, where ? 0  is constant value, x(n)are the discrete-time input

Calculate the gross pay, 1. Simon's monthly take home pay (after taxes) is ...

1. Simon's monthly take home pay (after taxes) is $2200, if he pays 19%  of his gross pay(before taxex) in tax, what is his gross pay? 2 . Convert the following quantities to th

Prove that the poset has a unique least element, Prove that the Poset has a...

Prove that the Poset has a unique least element Prove that if (A, ) has a least element, then (A,≤)  has a unique least element. Ans: Let (A, ≤) be a poset. Suppose the po

Shares and dividend, a man in rested rupee 800 is buying rupee 5 shares and...

a man in rested rupee 800 is buying rupee 5 shares and then are selling at premium of rupee 1.15. He sells all the shares.find profit

Weight, if an object weighed 11 pounds how many ounces would it weigh

if an object weighed 11 pounds how many ounces would it weigh

Example of multiplication of matrix, Given So calculate AB. Sol...

Given So calculate AB. Solution The new matrix will contain size 2 x 4. The entry in row 1 and column 1 of the new matrix will be determined by multiplying row 1 of

Properties of triangle, in a rhomus ABCD the circum radii of triangles ABD ...

in a rhomus ABCD the circum radii of triangles ABD and ACD are 12.5 cm and 25cm respetively then find the area of rhombus.

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