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

dividing decimals

Kevin invested $4,000 in an account which earns 6% interest per year and $x in a different account that earns 8% interest per year. How much is invested at 8% if the total amount o

how to solve algebra

Calculus Calculus is a branch of mathematics which describes how one variable changes in relationship to another variable. It enables us to determine the rate of change of one

The Shape of a Graph, Part II : In previous we saw how we could use the first derivative of a function to obtain some information regarding the graph of a function.  In this secti


Two tangents PA and PB are drawn to the circle with center O, such that ∠APB=120 o . Prove that OP=2AP. Ans:    Given : - ∠APB = 120o Construction : -Join OP To prove : -

Smith keeps track of poor work. Often on afternoon it is 5%. If he checks 300 of 7500 instruments what is probability he will find less than 20 substandard?

Peggy's town has an average temperature of 23° Fahrenheit in the winter. What is the average temperature on the Celsius scale? If the total amount for both is 80, after that th