function i4vec_amax_index_test ( )

%*****************************************************************************80
%
%% i4vec_amax_index_test() tests i4vec_amax_index().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 April 2009
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4vec_amax_index_test():\n' );
  fprintf ( 1, '  i4vec_amax_index():  index of maximum absolute entry;\n' );

  b = -n;
  c = n;

  a = randi ( [ b, c ], n, 1 );
 
  i4vec_print ( n, a, '  Input vector:' );

  fprintf ( 1, '\n' );

  ival = i4vec_amax_index ( n, a );

  fprintf ( 1, '  Maximum abs index: %d\n', ival );

  return
end
