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

Newton's Method : If x n is an approximation a solution of f ( x ) = 0 and if given by, f ′ ( x n ) ≠ 0 the next approximation is given by

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

Polar to Cartesian Conversion Formulas x = r cos Θ y = r sin Θ Converting from Cartesian is more or less easy.  Let's first notice the subsequent. x 2 + y 2   = (r co


By pigeonhole principle, show that if any five numbers from 1 to 8 are chosen, then two of them will add upto 9.    Answer: Let make four groups of two numbers from 1 to 8 like

Euler''s Constant (e) Approximate the number to the one hundredth, one ten-thousandths, and one one-hundred-millionth.

Another aid that can help children practise subtraction is the number strip. TGS can be used to improve their ability to count backwards. For example, subtracting 4 from 9 means

find the composition of the simple harmonic motion of the same period in the perpendicular directions

Two tanks initially contain 100 liter liquid each. Their initial concentration are listed in the Figure below. At time zero, the input and output valves are opened simultaneously w