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
A telephone company charges $.35 for the first minute of a phone call and $.15 for each additional minute of the call. Which of the subsequent represents the cost y of a phone call

If x = b y where both b > 0, x > 0, then we define y = log b x, which is read as "y is the log to the base b of x". This means that, log b x or y is the number to

Find out the average temperature: Example: Find out the average temperature if the subsequent values were recorded: 600°F, 596°F, 597°F, 603°F Solution: Step

Two stations due south of a tower, which leans towards north are at distances 'a' and 'b' from its foot. If α and β be the elevations of the top of the tower from the situation, Pr

Example of Least Common Denominator: Example: Add 1/7 +2 /3 + 11/12 + 4/6 Solution: Step 1:             Find out primes of each denominator. 7 = 7 (already is


Devise one activity each to help the child understand 'as many as' and 'one-to-one correspondence'. Try them out on a child/children in your neighbourhood, and record your observat



Minima, Maxima and points of inflexion a)      Test for relative maximum Consider the given function of x whose graph is presented by the figure given below