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

Find a formula for its frequency of oscillation, The frequency of oscillati...

The frequency of oscillation of an object suspended on a spring depends on the stiffness k of the spring (called the spring constant) and the mass m of the object. If the spring is

Partial derivatives - set theory, Partial Derivatives Partial derivati...

Partial Derivatives Partial derivatives are used while we want to investigate the effect of one independent variable on dependent variable. For illustration, the revenues of a

How to converting percents to fractions, How to Converting Percents to Frac...

How to Converting Percents to Fractions ? To convert a percent to a fraction: 1. Remove the percent sign. 2. Create a fraction, in which the resulting number from Step 1 is

E is irrational, If e were rational, then e = n/m for some positive integer...

If e were rational, then e = n/m for some positive integers m, n. So then 1/e = m/n. But the series expansion for 1/e is 1/e = 1 - 1/1! + 1/2! - 1/3! + ... Call the first n v

Solve the second order differential equations, Solve the subsequent IVP ...

Solve the subsequent IVP Y'' - 9 y = 0, y(0) = 2, y'(0) = -1 Solution First, the two functions  y (t ) = e 3t  and  y(t ) = e -3t That is "nice enough" for us to

High dimensions, List the five most important things you learned about high...

List the five most important things you learned about high dimensions.

Build upon the childs background with maths, BUILD UPON THE CHILDS BACKGROU...

BUILD UPON THE CHILDS BACKGROUND :  As you read in previous, each child is unique. Individual children vary in age, level of cognition, background, etc. What implications does thi

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