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

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++.

Write a for loop to perform elementary row operations, Use Matlab to solve ...

Use Matlab to solve the following set of linear equations by Gaussian Elimination. Write a for loop to perform elementary row operations on the augmented matrix to produce

Triple the fundamental frequency, For the signal with four harmonics (first...

For the signal with four harmonics (first to fourth) that can be obtained from the script, do the following: a)  Place the time domain signal for the case in which all the harmo

Reading from a file, Reading from a File: A file has been once created...

Reading from a File: A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext

Script - matlab, Script - MATLAB: The script is a series of MATLAB ins...

Script - MATLAB: The script is a series of MATLAB instructions which is stored in a file and saved. The contents of a script can be showed in the Command Window by using the t

CPM AND PERT, ACTIVITIES OF A PROJECT 1-2 1-3 1-4 1-5 2-6 3-6 3-7 4-7 5-7 7...

ACTIVITIES OF A PROJECT 1-2 1-3 1-4 1-5 2-6 3-6 3-7 4-7 5-7 7-6 6-8 7-8 THE COMMPANY LOSES 2,000 FOR EVERY WEEK THE PROJECT LASTS BEYOND 30 WEEKS. fOR EACH OF THE PROPOSALS; ACTIVI

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