find the volume if pyramid, MATLAB Programming

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:- find the volume if pyramid

Find the total per phase inductance and per phase shunt, A 300 km, 3-phase,...

A 300 km, 3-phase, 50Hz transmission line has spacing as shown in Figure 2. Each phase of the line consists of a bundle of three conductors.  (a) Find the total per-phase induct

Exact arithmetic, Run the MATLAB script sum = single(0); term = single(1); ...

Run the MATLAB script sum = single(0); term = single(1); n=1; while sum + term > sum sum = sum+term; n=n+1; term = 1/n; end n Explain what you think it is trying to do. What wou

#GUI, #create a matlab GUI for designing common emitter amplifier which pro...

#create a matlab GUI for designing common emitter amplifier which produces AC load lines based on the component values

Random numbers, Random numbers: Whenever a program is being written to...

Random numbers: Whenever a program is being written to work with a data, and the data is not yet available, it is frequently useful to test the program first by initializing t

Ray tracing equations, i want to write a program in mat lab for optimizing ...

i want to write a program in mat lab for optimizing the design of lens help me how could i i am new user of matlab but previously i have work on C++.

Load from file and plot data, Example: Load from File and Plot Data: A...

Example: Load from File and Plot Data: As illustration, a file known as timetemp.dat stores two lines of data. The first line is the time of the day, and the next line is the

Null basis and range basis, You will write functions • B=null basis(A,tol);...

You will write functions • B=null basis(A,tol); • B=range basis(A,tol); The function null basis takes a matrix A as input, and outputs a basis for the null space of A, obtained via

Flow chart, conversion of decimal to binary

conversion of decimal to binary

Video compression, please tell me how to compress a video in matlab

please tell me how to compress a video in matlab

Linear Programming, Ft. Loudoun and Watts Bar are two large hydroelectric d...

Ft. Loudoun and Watts Bar are two large hydroelectric dams, the former upstream of the latter. The level of Watts Bar Lake must be kept within limits for recreational purposes, and

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