Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Update this half pipe volume algorithm and create a flow chart and a script file (original flowchart to right) to allow the user to input

Update this half pipe volume algorithm and create a flow chart and a script file (original flowchart to right) to allow the user to input three different sets of halfpipe parameters

Use a for loop to do this.

Below is the code used to calculate the half pipe volume. Covert this to a for loop.

length = input('Please enter the length in inches: '); od = input('Please enter the outer diameter in inches: '); id = od*0.8; vol_outer = .5*pi*((od/2)^2)*length; vol_inner = .5*pi*((id/2)^2)*length; vol = vol_outer - vol_inner; v_gals = vol/231; fprintf('\t The volume inside this half cylinder is %1.4f gallons. ',v_gals)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How would you assess the value of an approach like this?

Answered: 1 week ago