function r8lt_sl_test ( )

%*****************************************************************************80
%
%% r8lt_sl_test() tests r8lt_sl().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    24 August 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8lt_sl_test():\n' );
  fprintf ( 1, '  r8lt_sl() solves A*x=b for an R8LT matrix A.\n' );

  for i = 1 : n
    for j = 1 : n
      if ( j <= i )
        a(i,j) = j;
      else
        a(i,j) = 0.0;
      end
    end
  end

  r8lt_print ( n, n, a, '  The R8LT matrix:' );
%
%  Set the desired solution.
%
  x = r8vec_indicator1 ( n );
%
%  Compute the corresponding right hand side.
%
  b = r8lt_mv ( n, n, a, x );
%
%  Solve the linear system.
%
  x = r8lt_sl ( n, a, b );

  r8vec_print ( n, x, '  Solution:' );

  return
end
