function value = tetrahedron_unit_monomial_integral ( expon )

%*****************************************************************************80
%
%% tetrahedron_unit_monomial_integral() integrates a monomial over the unit tetrahedron.
%
%  Discussion:
%
%    This routine evaluates a monomial of the form
%
%      product ( 1 <= dim <= dim_num ) x(dim)^expon(dim)
%
%    where the exponents are nonnegative integers.  Note that
%    if the combination 0^0 is encountered, it should be treated
%    as 1.
%
%    Integral ( over unit tetrahedron ) x^l y^m z^n dx dy = 
%    l! * m! * n! / ( m + n + 3 )!
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 May 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer EXPON(3), the exponents.
%
%  Output:
%
%    real VALUE, the value of the integral of the monomial.
%

%
%  The first computation ends with VALUE = 1.0;
%
  value = 1.0;

  k = 0;

  for i = 1 : expon(1)
    k = k + 1;
%   value = value * i / k;
  end

  for i = 1 : expon(2)
    k = k + 1;
    value = value * i / k;
  end

  for i = 1 : expon(3)
    k = k + 1;
    value = value * i / k;
  end

  k = k + 1;
  value = value / k;

  k = k + 1;
  value = value / k;

  k = k + 1;
  value = value / k;

  return
end
