function comp_random_test ( )

%*****************************************************************************80
%
%% comp_random_test() tests comp_random().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 June 2020
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  k = 5;

  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 = comp_random ( n, k );
    for j = 1 : k
      fprintf ( 1, '  %2d', a(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
