function gray_code_rank_test ( )

%*****************************************************************************80
%
%% gray_code_rank_test() tests gray_code_rank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 November 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'gray_code_rank_test():\n' );
  fprintf ( 1, '  gray_code_rank() ranks a given Gray code.\n' );

  n = 5;
  t = [ 1, 1, 0, 0, 0 ];

  rank = gray_code_rank ( n, t );

  i4vec_print ( n, t, '  Element to be ranked:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Computed rank: %d\n', rank );

  return
end
