function J = p16_j ( m, n, x )

%*****************************************************************************80
%
%% p16_j() evaluates the jacobian for problem 16.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%  Modified:
%
%    03 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of equations.
%
%    integer N, the number of variables.
%
%    real X(N), the evaluation point.
%
%  Output:
%
%    real J(M,N), the jacobian matrix.
%
  J = ones ( m, n );

  for j = 1 : n
    J(j,j) = 2.0;
  end

  for j = 1 : n
    temp = x(j);
    x(j) = 1.0;
    J(n,j) = prod ( x(1:n) );
    x(j) = temp;
  end

  return
end
