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
Quality Control Normally there is a quality control departments in every industry which is charged along with the responsibility of ensuring about the products made do meet th


I am the least two digit number which round off to 100?

Relative Frequency  This type of probability requires us to make some qualifications. We define probability of event A, occurring as the proportion of times A occurs, if we re

I need help with my calculus work

Calculate the area and circumference of a circle: Calculate the area and circumference of a circle with a 3" radius.  Solution: A =      πr2

If A & B are (-2,-2) and (2,-4) respectively, find the co ordinates of P such that AP =3/7 AB and P lies on the line segment AB.

What is the value of tan? in terms of sin?. Ans:    Tan ? = S i n ?/ C os ? Tan ? = S i n ? / √1 - S i n   2?


Consider two bags, A and B, with the following contents a)    A single marble is drawn from each bag. What is the probability of getting a white marble out of Bag A and a red marb