function i4vec_choose_test ( )

%*****************************************************************************80
%
%% I4VEC_CHOOSE_TEST tests I4VEC_CHOOSE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 January 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4VEC_CHOOSE_TEST:\n' );
  fprintf ( 1, '  I4VEC_CHOOSE computes the generalized binomial coefficient.\n' );

  m = 5;
  seed = 12345678;

  [ j, seed ] = i4vec_uniform_ab ( m, 0, 6, seed );
  [ k, seed ] = i4vec_uniform_ab ( m, 0, 6, seed );
  n(1:m) = j(1:m) + k(1:m);

  i4vec_transpose_print ( m, n, '  N:' );
  i4vec_transpose_print ( m, k, '  K:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '   M        V1        V2\n' );
  fprintf ( 1, '\n' );
  v1 = 1;
  for mm = 0 : m
 
    if ( mm == 0 )
      v1 = 1;
    else
      v1 = v1 * i4_choose ( n(mm), k(mm) );
    end
    v2 = i4vec_choose ( mm, n, k );
    fprintf ( 1, '  %2d  %8d  %8d\n', mm, v1, v2 );

  end

  return
end
