write a script to determine the volume of a


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.

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: write a script to determine the volume of a
Reference No:- TGS0422479

Expected delivery within 24 Hours