function i4vec_red_test ( )

%*****************************************************************************80
%
%% I4VEC_RED_TEST tests I4VEC_RED.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4VEC_RED_TEST\n' );
  fprintf ( 1, '  I4VEC_RED divides out any common factors in the\n' );
  fprintf ( 1, '  entries of an I4VEC.\n' );

  m = 5;
  n = 3;
  a = [ ...
    12, 88,   9; ... 
     4,  8, 192;
   -12, 88,  94;
    30, 18,  42;
     0,  4,   8 ];
 
  i4mat_print ( m, n, a, '  Apply I4VEC_RED to each row of this matrix:' );

  for i = 1 : m
    [ a(i,1:n), factor ] = i4vec_red ( n, a(i,1:n), 1 );
  end

  i4mat_print ( m, n, a, '  Reduced matrix:' );


  return
end
