function perm_parity_test ( )

%*****************************************************************************80
%
%% PERM_PARITY_TEST tests PERM_PARITY.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    26 December 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'PERM_PARITY_TEST\n' );
  fprintf ( 1, '  PERM_PARITY computes the parity of a permutation,\n' );

  n = 5;
  seed = 123456789;

  for test = 1 : 5
    [ p, seed ] = perm_random ( n, seed );
    perm_print ( n, p, '  The permutation P:' );
    parity = perm_parity ( n, p );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  The parity is %d\n', parity );
  end

  return
end
