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

Calculus level 2, the first question should be done using the website given...

the first question should be done using the website given (www.desmos.com/calculator )and another good example to explain using the graph ( https://www.desmos.com/calculator/ydimzr

Profit, A wholesaler allows a discount of 20% on the list price to a retail...

A wholesaler allows a discount of 20% on the list price to a retailer. The retailer sells at 5% discount on the list price.If a customer paid Rs 114 for an article,what profit is m

Famous Numbers, Do you provide the answers to the Famous Numbers Exercise?

Do you provide the answers to the Famous Numbers Exercise?

Find the integral of a function, We want to find the integral of a function...

We want to find the integral of a function at an arbitrary location x from the origin. Thus, where I(x=0) is the value of the integral for all times less than 0. (Essenti

Find out height of the box which will give maximum volume, We contain a pie...

We contain a piece of cardboard i.e. 14 inches by 10 inches & we're going to cut out the corners as illustrates below and fold up the sides to form a box, also illustrated below. F

Linear equation, tens digit of a 2-digit number is twice its unit digit. If...

tens digit of a 2-digit number is twice its unit digit. If the sum of the digit is 12, find the number.

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