Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!