the volume of a pyramid, Mathematics

Assignment Help:

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.

 


Related Discussions:- the volume of a pyramid

What is equivalence relation, What is equivalence relation?  Prove that rel...

What is equivalence relation?  Prove that relation  'congruence modulo' (  ≡mod m) is an equivalence relation.  Ans: A relation R illustrated on a nonempty set A is said to be

How many permutations can you make of the word statistics, Q. How many perm...

Q. How many permutations can you make of the word STATISTICS? Solution:  There are 10 letters in the word STATISTICS, i.e. n=10. Three of them are S's, so n 1 =3, three are T'

What are complex numbers, Q. What are Complex numbers? Ans. Comple...

Q. What are Complex numbers? Ans. Complex numbers are numbers of the form a + bi, where a and b are real numbers and i is a special number called the imaginary unit, which

X and y -intercept, X-intercept  If an intercept crosses the x-axis we ...

X-intercept  If an intercept crosses the x-axis we will call it as x-intercept .  Y-intercept Similar, if an intercept crosses the y-axis we will call it as a y-inter

Evaluate integrals (1 - (1 /w) cos (w - ln w) dw, Evaluate following integr...

Evaluate following integrals.                       ( (1 - (1 /w) cos (w - ln w) dw Solution In this case we know how to integrate only a cosine therefore let's makes th

Second order differential equation, Write the subsequent 2nd order differen...

Write the subsequent 2nd order differential equation as a system of first order, linear differential equations. 2 y′′ - 5 y′ + y = 0  y (3) = 6  y′ (3) = -1  We can wri

Probability, Question: There are 6 letters and 6 self addressed envelopes.W...

Question: There are 6 letters and 6 self addressed envelopes.What is the probability that atleast 1 is placed correctly?? Ans: If we let A be the event that letter A is in the cor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd