function result = printArray(x)
% printArray   return the sum of a vector
%
% Examples:
%    >> printArray([3 2 7])
%    ans = 3 2 7
%    >>
%    >> printArray([])
%    ans = []
%    >>
% P. Conrad for CISC106 10/31/07
  
  
  if ( isempty(x)  )
    
    fprintf('[]\n');
    
  elseif (length(x)==1)
    
    fprintf('%2.0f\n', x(1));

  else

    fprintf('%2.0f ', x(1));
    printArray (x(2:end));
    
  end
  
  
  
  return;
  
end
  