function ksub_random_test ( )

%*****************************************************************************80
%
%% ksub_random_test() tests ksub_random().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  k = 3;
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ksub_random_test():\n' );
  fprintf ( 1, '  ksub_random() generates a random K subset of an N set.\n' );
  fprintf ( 1, '  Set size is N =    %d\n', n );
  fprintf ( 1, '  Subset size is K = %d\n', k );
  fprintf ( 1, '\n' );

  for i = 1 : 5

    a = ksub_random ( n, k );

    for j = 1 : k
      fprintf ( 1, '  %3d', a(j) );
    end
    fprintf ( 1, '\n' );

  end

  return
end
