function toms515_test01 ( )

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

  fprintf ( 1, '\n' );
  fprintf ( 1, 'toms515_test01():\n' );
  fprintf ( 1, '  comb() generates all 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 l = 1 : lmax
    c = comb ( n, k, l );
    fprintf ( 1, '  %6d:  ', l );
    for i = 1 : k
      fprintf ( 1, '  %6d', c(i) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
