function r8ut_sl_test ( )

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

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8ut_sl_test():\n' );
  fprintf ( 1, '  r8ut_sl() solves a linear system A*x=b with R8UT matrix;\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );

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

  r8ut_print ( n, n, a, '  The upper triangular matrix:' );
%
%  Set the desired solution.
%
  x = r8vec_indicator1 ( n );
%
%  Compute the corresponding right hand side.
%
  b = r8ut_mv ( n, n, a, x );
%
%  Solve the linear system.
%
  x = r8ut_sl ( n, a, b );

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

  return
end
