function printcylvols(cyls)
for ii = 1:length(cyls)
   vol = cylvol(cyls(ii).dimensions);
   fprintf('Cylinder %c has a volume of %.1f\n', cyls(ii).code, vol);
end

function cvol = cylvol(dims)
cvol = pi * dims.rad ^ 2 * dims.height;

