function pythag_triple_next_test ( )

%*****************************************************************************80
%
%% pythag_triple_next_test() tests pythag_triple_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2009
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pythag_triple_next_test():\n' );
  fprintf ( 1, '  pythag_triple_next() computes the "next"\n' );
  fprintf ( 1, '    Pythagorean triple.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   I   J   A   B   C  A^2+B^2   C^2\n' );
  fprintf ( 1, '\n' );

  i = 0;
  j = 0;

  for k = 0 : 20
    [ a, b, c, i, j ] = pythag_triple_next ( i, j );
    d = a^2 + b^2;
    e = c^2;
    fprintf ( 1, '%4d  %4d  %4d  %4d  %4d  %8d  %8d\n', i, j, a, b, c, d, e );
  end

  return
end
