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

NUMERABILITY, AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROC...

AFIGURE THIS OUT(3) (14) (17) (20) (25)= 8 WHAT ARE THE PROCEDURES (-)(+)(x)(div) BETWEEN EACH NUMBER TO COME UP WITH 8 ?

What is the length of one side of the square, The area of a square is 64 cm...

The area of a square is 64 cm 2 . What is the length of one side of the square? To find out the area of a square, you multiply the length of a side through itself, because all

Cross product - vector, Cross Product In this last section we will loo...

Cross Product In this last section we will look at the cross product of two vectors.  We must note that the cross product needs both of the vectors to be three dimensional (3D

Rules of logarithms, Rule 1 The logarithm of 1 to any base is 0. Pro...

Rule 1 The logarithm of 1 to any base is 0. Proof We know that any number raised to zero equals 1. That is, a 0 = 1, where "a" takes any value. Therefore, the loga

Counters and registers, design a synchronous, recycling, MOD-12 counter wit...

design a synchronous, recycling, MOD-12 counter with D FF''s. Use the states 0000 through 1011 in the counter.

Probability, If a school has lockers with 50 numbers on each co...

If a school has lockers with 50 numbers on each combination lock, how many possible combinations using three numbers are there.

Advanced functions, writ the equation that describes the motion of a point ...

writ the equation that describes the motion of a point on the wheel that has a center of 4m off the ground, has radius of 15 cm, makes a full rotation every 10 seconds and starts a

Determine y' for xy = 1 by implicit differentiation, Determine y′ for xy = ...

Determine y′ for xy = 1 . Solution : There are in fact two solution methods for this problem. Solution 1: It is the simple way of doing the problem.  Just solve for y to

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