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
Explain Comparing Fractions with example? If fractions are not equivalent, how do you figure out which one is larger? Comparing fractions involves finding the least common

It is the full blown case where we consider every final possible force which can act on the system. The differential equation in this case, Mu'' + γu'  + ku = F( t) The displ

together, pearl and harvey are going to visit their aunt on sunday. If Pearl visits their aunt every 6 days, while harvey every 8 days, on what day will they visit their aunt toget

Rental car agency has 50 cars. Rental rate in winter is 60%. What is probability that in give winter month the rental rate is fewer than 35 cars rented? Use normal distribution to

find regular grammar for the following regular expression: a(a+b)*(ab* +ba*)b

5 hockey pucks and three hockey sticks cost $23. 5 hockey pucks and 1 hockey stick cost $20. How much does 1 hockey puck cost?

Q. Graphing Sets of Numbers? Ans. To  graph  a set of numbers on a number line means to plot, or locate, those positions on the line. The number that corresponds to a poin

encoded with the matrix -3 -7 and 4 9. what lights up a soccer stadium? ecoded message: {-3 - 7} {3 2 } {3 6} {57 127} {52 127} {77 173} {23 51)


Solving Trig Equations with Calculators, Part II : Since this document is also being prepared for viewing on the web we split this section into two parts to keep the size of the