function pruefer_rank_test ( )

%*****************************************************************************80
%
%% pruefer_rank_test() tests pruefer_rank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 December 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'pruefer_rank_test():\n' );
  fprintf ( 1, '  pruefer_rank() ranks Pruefer codes.\n' );

  p = [ 3, 1 ];
  i4vec_transpose_print ( n - 2, p, '  Element to be ranked:' );

  rank = pruefer_rank ( n, p );

  fprintf ( 1, ' \n' );
  fprintf ( 1, '  The rank of the element is computed as %d:\n', rank );

  return
end
