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 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
case 2:when center is not known proof

1. A rectangular piece of cardboard measuring 26 inches by 42 inches is to be made into a box with an open top by cutting equal size squares from each comer and folding up the side

A digital filter has zero at z=a and poles at z=b andz=c, where a, b, c are the real constants. Determine the transfer function and the frequency response function of the filter an

Calculate the volume and surface area of a cube: Calculate the volume and surface area of a cube with a = 3".  Be sure to involved units in your answer. Solution: V =

Derive the probability distribution of the completion times: a. The following probability distributions relate to the completion times, in weeks, T A and T B of two independ

Use the graph of y = x2 - 6x  to answer the following: a)         Without solving the equation (or factoring), determine the solutions to the equation  x 2 - 6x = 0  usi

I am less than 100 the sum of my digits is 4 half of me is an odd number

Evaluate the below given limit. Solution Note as well that we actually do have to do the right-hand limit here. We know that the natural logarithm is just described fo

Suggest me the solution: Consider the given universal set T and its subjects C, D and E T = {0, 2, 4, 6, 8, 10, 12} C = {4, 8,} D = {10, 2, 0} E = {0} Find out

economic order quantities (EOQ) Statistics may be utilized in ordering or making economic order quantities as EOQ. It is significant for a business manager to understand that