%  Program CylScript2.m
%  S. Scott Moor      January 2017 
%  This program will calculate the Volume and Surface Area  of a right circular cylinder 
%  based on radius and height. It is capable of handling vectors of dimensions as input.   
%
%  Variables used: 
%  Inputs:  
%   r = radius (length units)
%   h = height (same length units)
%
%  Outputs    
%   V = volume of cylinder (cubic length units)
%   SA = surface Area of cylinder (squared length units)

%  input section -  interactive input from command window 
r =  input('Enter the radius of the cylinder: ');
h = input('Enter the height of the cylinder: ');

% Calculation & display of volume 
disp('Volume of Cylinder (cubic meters): ')
V = pi*r.^2.*h  					

% Calculation & display of surface area
disp('Surface Area of Cylinder (square meters): ')
SA = 2*pi*r.*(r + h)			
