function ksubset_lex_unrank_test ( )

%*****************************************************************************80
%
%% ksubset_lex_unrank_test() tests ksubset_lex_unrank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 December 2015
%
%  Author:
%
%    John Burkardt
%
  k = 3;
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ksubset_lex_unrank_test():\n' );
  fprintf ( 1, '  ksubset_lex_unrank() unranks K-subsets of an N set,\n' );
  fprintf ( 1, '  using the lexicographic ordering.\n' );

  rank = 5;

  fprintf ( 1, ' \n' );
  fprintf ( 1, '  The element of rank %d:\n', rank );

  t = ksubset_lex_unrank ( rank, k, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, '        ' );
  for i = 1 : k
    fprintf ( 1, '%5d', t(i) );
  end
  fprintf ( 1, '\n' );

  return
end
