function triangle_lower_to_i4_test ( )

%*****************************************************************************80
%
%% TRIANGLE_LOWER_TO_I4_TEST tests TRIANGLE_LOWER_TO_I4.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'TRIANGLE_LOWER_TO_I4_TEST\n' );
  fprintf ( 1, '  TRIANGLE_LOWER_TO_I4 converts a lower triangular index\n' );
  fprintf ( 1, '  to a linear one.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   I, J =>  K\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 4
    for j = 1, i
      k = triangle_lower_to_i4 ( i, j );
      fprintf ( 1, '  %4d  %4d    %4d\n', i, j, k );
    end
  end

  return
end
