Determine the volume of the pyramid

Assignment Help MATLAB Programming
Reference no: EM13127212

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.

Reference no: EM13127212

Questions Cloud

Illustrate what total amount of gain or loss : Illustrate what total amount of gain or loss on its securities should be included in Nance's income statement for the year ended December 31, 2007?
Probability that sample of steady smokers spend in a range : Assume a steady smoker spends on average $20 with a standard deviation of $5 per week on cigarettes. What is the probability that a sample of 100 steady smokers spend between $19.50 and $21?
.calculate the mass of 0.1550l of benzene : the density of benzene at 15 degrees C is 0.8787g/ml.calculate the mass of 0.1550L of benzene at this temp.
Explain how many units of the sale item should store stock : Explain how many units of the sale item should the store stock in order to have at most a 1 percent chance of running short of the item on the day of the sale?
Determine the volume of the pyramid : 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.
Bond issue at the time of sale : The bonds were quoted at 94 and pay interest quarterly on September 30th and December 31st. What were the total proceeds of the bond issue at the time of sale:
Estimate the wavelength (in nm) : Protons can be accelerated to speeds near that of light in particle accelerators. Estimate the wavelength (in nm) of such a proton moving at 2.90 X 108 m/s. (Mass of a proton=1.673 X 10-27 kg)
Multiplication of complex numbers problem : Is the multiplication of complex numbers similar to multiplication of polynomials? Is it possible to apply the FOIL method when multiplying complex numbers?
Probability all four of selected homes have security system : Four homes are selected at random: What is the probability all four of the selected homes have a security system? (Round your answer to 4 decimal places.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

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