function i4mat_row_reduce_test ( )

%*****************************************************************************80
%
%% i4mat_row_reduce_test() tests i4mat_row_reduce().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 September 2018
%
%  Author:
%
%    John Burkardt
%
  m = 5;
  n = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4mat_row_reduce_test():\n' );
  fprintf ( 1, '  i4mat_row_reduce() divides out any common factors in the\n' );
  fprintf ( 1, '  entries of a row of an I4MAT.\n' );

  a = [ ...
    12, 88,   9; ...
     4,  8, 192; ...
   -12, 99,  94; ...
    30, 18,  42; ...
     0,  4,   8 ];

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

  for i = m : -1 : 1
    a = i4mat_row_reduce ( m, n, i, a );
    i4mat_print ( m, n, a, '  After reducing a row:' );
  end

  return
end
