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
Average Function Value The first application of integrals which we'll see is the average value of a function. The given fact tells us how to calculate this. Average Functi

What is a way to solve indices

A pool is surrounded through a deck that has the similar width all the way around. The total area of the deck only is 400 square feet. The dimensions of the pool are 18 feet throug

Martha has $20 to spend and would like to buy as several calculators as possible along with the money. The calculators that she needs to buy are $4.50 each. How much money will she

Shane rolls a die numbered 1 by 6. What is the probability Shane rolls a 5? From 2:15 P.M. to 4:15 P.M. is 2 hours. After that, from 4:15 P.M. to 4:45 P.M. is another half hour

A 64-ounce bottle of detergent costs $3.20. What is the cost per ounce of detergent? To ?nd out the cost per ounce, divide the cost through the number of ounces; $3.20 ÷ 64 =

If the points (5, 4) and (x, y) are equidistant from the point (4, 5), prove that x 2 + y 2 - 8x - 10y +39 = 0. Ans :   AP = PB AP 2 = PB 2 (5 - 4) 2 + (4 - 5) 2 = (x

weather prediction on monsoon past data on project

What is the smallest possible number in which can be created along with four decimal places using the numbers 3, 5, 6, and 8? Place the smallest number in the largest place val

log4^(x+2)=log4^8