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

  Create a matrix of 5x6

Prepare a matrix of 5x6. with identical columns and rows ranging from 200 to 1000 in equal increments

  Determine the size for variables used in matlab program

If b=3, a=6 how many loops would the given program do? what will be the out put for z(4)? what would be size (in rows and columns) for variables z, i and b?

  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.

  Import the data into matlab and name the array ace_data

Parameter is related to the energy of the storm, since kinetic energy is proportional to velocity squared. However, it does not take into account the size of the storm, which would be necessary for a true total energy estimate.

  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

  Implement the finite difference method

Write a computer program to implement the finite difference method. The program can be in any computer language that is available within the school. Set up the code to find the potential for a parallel plate capacitor in the box shown below, all dime..

  Design and explain a computer-based simulation model

Design and explain a computer-based simulation model which you will use to estimate the probability that among 25, 50, 75, 100, 500, or 1000 randomly chosen people, at least 2 people share the same birthday.

  Determine the inputs, outputs, relevant formulas

determine the inputs, outputs, relevant formulas

  Finite difference method

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

  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.

  Mat lab programming problem

In case the problem in the code I want you to modify it give the correct temperature.

  Determine the stability status for the digital system

Sketch the z-plane pole-zero plot and determine the stability status for the following digital system.

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