function i4vec_frac_test ( )

%*****************************************************************************80
%
%% i4vec_frac_test() tests i4vec_frac();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2021
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  b = 1;
  c = 2 * n;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4vec_frac_test():\n' );
  fprintf ( 1, '  i4vec_frac(): K-th smallest integer vector entry.\n' );

  a = randi ( [ 1, 2*n ], n );

  i4vec_print ( n, a, '  The array to search:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Fractile    Value\n' );
  fprintf ( 1, '\n' );

  for k = 1 : floor ( n / 2 ) : n

    afrac = i4vec_frac ( n, a, k );

    fprintf ( 1, '  %6d  %6d\n', k, afrac );

  end

  return
end
