function result = product(v)
%product return product of a vector
%  consumes: v, a numeric vector
%  produces: result, a scalar number
% Examples:
%     >> product([3 4])
%     ans = 12
%     >> product([3 4 5])
%     ans = 60
%     >> product([676 95 0])
%     ans = 0
%     >> product([-1 5 -0.5 -1])
%     ans = -2.5
  
  result = 1;
  for k = 1:length(v)
     result = result * v(k);
  end
  return;
end

