function i4_key_advance_test ( )

%*****************************************************************************80
%
%% i4_key_advance_test() tests i4_key_advance().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 May 2008
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4_key_advance_test():\n' );
  fprintf ( 1, '  i4_key_advance() advances the key.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Step        key input       key output\n' );
  fprintf ( 1, '\n' );

  key_new = 12345;

  for step = 1 : 10

    key = key_new;
    key_new = i4_key_advance ( key );

    fprintf ( 1, '  %4d  %16d  %16d\n', step, key, key_new );

  end

  return
end
