function r83_cr_sls_test ( )

%*****************************************************************************80
%
%% r83_cr_sls_test() tests r83_cr_sls().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 August 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;
  debug = 0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R83_CR_SLS_TEST\n' );
  fprintf ( 1, '  R83_CR_SLS solves multiple linear systems A*x1:xn=b1:bn\n' );
  fprintf ( 1, '  after R83_CR_FA has factored it.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
  fprintf ( 1, '  Demonstrate multiple system solution method.\n' );
  fprintf ( 1, '\n' );
%
%  Set the matrix values.
%
  a = r83_dif2 ( n, n );
%
%  Print the matrix.
%
  r83_print ( n, n, a, '  Input matrix A:' );
%
%  Factor the matrix once.
%
  a_cr = r83_cr_fa ( n, a );
%
%  Set the number of right hand sides.
%
  nb = 2;
  b = zeros (n,nb);

  b(1:n-1,1) = 0.0E+00;
  b(n,1) = n + 1;

  b(1,2) = 1.0E+00;
  b(2:n-1,2) = 0.0E+00;
  b(n,2) = 1.0E+00;

  r8ge_print ( n, 2, b, '  Right hand sides b1:b2' );
%
%  Solve the linear systems.
%
  x = r83_cr_sls ( n, a_cr, nb, b );

  r8ge_print ( n, 2, x, '  Solutions x1:x2' );

  return
end

