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
Determine or find out the area of the inner loop of r = 2 + 4 cosθ. Solution We can graphed this function back while we first started looking at polar coordinates.  For thi

Suppose that we know the logarithms of all numbers which are expressed to base 'a' and we are required to find the logarithms of all these numbers to base 'b'. We

love is a parallelogram where prove that love is a rectangle

The adjoining figure shows the cross-section of a railway tunnel. The radius of the tunnel is 3.5m (i.e., OA=3.5m) and ∠AOB=90 o . Calculate : i.       the height of the

Write an octave program that will take a set of points {x k , f k } representing a function and compute the derivative at the same points x k using 1. 2-point forward di erence

L.H.S. =cos 12+cos 60+cos 84 =cos 12+(cos 84+cos 60) =cos 12+2.cos 72 . cos 12 =(1+2sin 18)cos 12 =(1+2.(√5 -1)/4)cos 12 =(1+.(√5 -1)/2)cos 12 =(√5 +1)/2.cos 12   R.H.S =c

Finding the Equation of a line, Given a Slope and a Point ? Find the equation of a line with slope m = 2, which passes through the point (-1, -3). Solution: Use the po

in triangle abc ab=ac and d is a point on side ac such that bc*bc=ac*cd. prove that bc=bd