HW6_Curtis_Ryan

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

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

View Full Document Right Arrow Icon
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:
Background image of page 1

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

View Full DocumentRight Arrow Icon
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 =
Background image of page 2
10W-GV HW6 2/23/11 Curtis, Ryan 3 12.9193 SA = 33.6145 Discussion: The function ran as expected.
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

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 Right Arrow Icon
Ask a homework question - tutors are online