function i4_divp_test ( )

%*****************************************************************************80
%
%% i4_divp_test() tests i4_divp().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    26 July 2010
%
%  Author:
%
%    John Burkardt
%
  a_hi =  100;
  a_lo = -100;
  b_hi =  10;
  b_lo = -10;
  test_num = 20;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4_divp_test():\n' );
  fprintf ( 1, '  i4_divp() returns the smallest multiplier of J\n' );
  fprintf ( 1, '  that is less than I\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '     A     B     C     D\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num
    a = randi ( [ a_lo, a_hi ], 1 );
    b = randi ( [ b_lo, b_hi ], 1 );
    if ( b == 0 )
      b = 7;
    end
    c = i4_divp ( a, b );
    d = c * b;
    fprintf ( 1, '  %4d  %4d  %4d  %4d\n', a, b, c, d );
  end

  return
end
