function toms515_test03 ( )

%*****************************************************************************80
%
%% toms515_test03() tests comb() by generating 10 random 3-subsets of a 25 set.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 March 2016
%
%  Author:
%
%    John Burkardt
%
  n = 25;
  k = 3;
  lmax = binom ( n, k );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'toms515_test03():\n' );
  fprintf ( 1, '  comb() generates 10 random K-subsets of an N set.\n' );
  fprintf ( 1, '  K = %d\n', k );
  fprintf ( 1, '  N = %d\n', n );
  fprintf ( 1, '  LMAX = %d\n', lmax );
  fprintf ( 1, '\n' );

  for i = 1 : 10
    l = randi ( [ 1, lmax ], 1 );
    c = comb ( n, k, l );
    fprintf ( 1, '  %6d:  ', l );
    for j = 1 : k
      fprintf ( 1, '  %6d', c(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
 
