HW6_Curtis_Ryan

# HW6_Curtis_Ryan - 10W-GV HW6 2/23/11 Curtis, Ryan Problem...

This preview shows pages 1–5. Sign up to view the full content.

10W-GV HW6 2/23/11 Curtis, Ryan 1 Problem ID: Scholar HW6 Problem 1 Problem Statement: Create a program function that will output surface area and volume of a circular cone after inputting height and diameter. Diagram: Solution: Flowchart:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10W-GV HW6 2/23/11 Curtis, Ryan 2 Start Input Diameter Height Radius = Diameter/2 Volume = 1/ 3*pi*R^2 SA =pi*((Radius^2 +Height^2)^.5)*Ra dius + pi*Radius^2 Output SA Volume End Listing: function [Vol,SA]=Conevol(Diameter,Height) %Name of the function Radius = Diameter / 2; %Radius is half the diameter Vol = (1/3)*pi*(Radius^2)*Height; %Equation to find volume of a cone SA = pi*((Radius^2 + Height^2)^.5)*Radius + pi*Radius^2; %Equation to find Surface Area of a cone end Sample Run: >> [Vol,SA]=Conevol(pi,5) Vol =
10W-GV HW6 2/23/11 Curtis, Ryan 3 12.9193 SA = 33.6145 Discussion: The function ran as expected.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10W-GV HW6 2/23/11 Curtis, Ryan 4 Problem ID: Scholar HW6 Problem 2 Problem Statement : To create a program that will find the surface area and volumes of cones. The user
This is the end of the preview. Sign up to access the rest of the document.

## HW6_Curtis_Ryan - 10W-GV HW6 2/23/11 Curtis, Ryan Problem...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online