function derange_enum2_test ( )

%*****************************************************************************80
%
%% DERANGE_ENUM2_TEST tests DERANGE_ENUM2.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'DERANGE_ENUM2_TEST\n' );
  fprintf ( 1, '  DERANGE_ENUM2 counts derangements.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  N    # of derangements\n' );
  fprintf ( 1, '\n' );

  d = derange_enum2 ( n );

  for i = 0 : n
    fprintf ( 1, '  %8d  %8d\n', i, d(i+1) );
  end

  return
end
