function comp_random_test ( )

%*****************************************************************************80
%
%% COMP_RANDOM_TEST tests COMP_RANDOM.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    20 May 2015
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  k = 5;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'COMP_RANDOM_TEST\n' );
  fprintf ( 1, '  COMP_RANDOM generates random compositions.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Seeking compositions of %d into %d parts.\n', n, k );
  fprintf ( 1, '\n' );

  for i = 1 : 5
    [ a, seed ] = comp_random ( n, k, seed );
    for j = 1 : k
      fprintf ( 1, '  %2d', a(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
