function dif_print ( ntab, xtab, diftab, title )

%*****************************************************************************80
%
%% dif_print() prints the polynomial represented by a divided difference table.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 September 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer NTAB, the dimension of the arrays DIFTAB and XTAB.
%
%    real XTAB(NTAB), the X values for the polynomial.
%
%    real DIFTAB(NTAB), the divided difference table
%    for the polynomial.
%
%    string TITLE, a title.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '%s\n', title );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  p(x) =                           %14f\n', diftab(1) );

  for i = 2 : ntab
    fprintf ( 1, '       + ( x - %14f) * ( %14f\n', xtab(i-1), diftab(i) );
  end

  fprintf ( 1, '  ' );
  for i = 1 : ntab - 1
    fprintf ( 1, ')' );
  end
  fprintf ( 1, '\n' );

  return
end
