the volume of a pyramid, Mathematics

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.

 

Posted Date: 3/20/2013 1:08:52 AM | Location : United States







Related Discussions:- the volume of a pyramid, Assignment Help, Ask Question on the volume of a pyramid, Get Answer, Expert's Help, the volume of a pyramid Discussions

Write discussion on the volume of a pyramid
Your posts are moderated
Related Questions
Simplify the Boolean function: F (w,x,y,z) = ∑ (0, 1, 2, 3, 4, 6, 8, 9, 12, 13, 14)  (8)  Ans:   f(w, x, y, z) = ∑(0, 1, 2, 3, 4, 6, 8, 9, 12, 13, 14) The above

The graph C n , n  ≥  3 contains n vertices and n edges creating a cycle. For what value of n is C n a bipartite graph? Draw the bipartite graph of C n to give explanation for yo

One-to-one function: A function is called one-to-one if not any two values of x produce the same y.  Mathematically specking, this is the same as saying,  f ( x 1 ) ≠ f ( x 2

The diagrams drawn to given sets are called as Venn diagrams or Eule -Venn diagrams. Here given the universal set U by points within rectangle and the subset A of the set U given b

need help to write Marketing research reprot about IBM company using spss (statistical program) to analys the given data about the company and write the report according to given i

To begin with we have counting numbers. These numbers are also known as natural numbers and are denoted by a symbol 'N'. These numbers are obtai

Hydrostatic Pressure and Force - Applications of integrals In this part we are going to submerge a vertical plate in water and we wish to know the force that is exerted on t

Determine the measure of the vertex angle of the isosceles triangle. a. 34° b. 16° c. 58° d. 112° d. Simply substitute x = 34 into the equation for the vertex angle,

The m&m factory produces 2,500 packs of plain m&ms each day. Represent the total number of packs of plain m&ms the factory makes each day

It is known that a radioactive material decays at a rate proportional to the amount present.If after a period of 12 years,a 2g piece of radium weighs 1.99g.How long will it be befo