function i4_sqrt_test ( )

%*****************************************************************************80
%
%% i4_sqrt_test() tests i4_sqrt().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4_sqrt_test():\n' );
  fprintf ( 1, '  i4_sqrt() computes the square root of an integer.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '       N  Sqrt(N) Remainder\n' );
  fprintf ( 1, '\n' );

  for n = -5 : 20

    [ q, r ] = i4_sqrt ( n );
    fprintf ( 1, '  %7d  %7d  %7d\n', n, q, r );

  end

  return
end
