function r8_nint_test ( )

%*****************************************************************************80
%
%% r8_nint_test() tests r8_nint().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 July 2014
%
%  Author:
%
%    John Burkardt
%
  test_num = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_NINT_TEST\n' );
  fprintf ( 1, '  R8_NINT produces the nearest integer.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      X      R8_NINT(X)\n' );
  fprintf ( 1, '\n' );

  b = -10.0;
  c = +10.0;

  for test = 1 : test_num
    x = b + ( c - b ) * rand ( 1, 1 );
    fprintf ( 1, '  %10f  %6d\n', x, r8_nint ( x ) );
  end

  return
end
