function i4vec_sorted_unique_count_test (  )

%*****************************************************************************80
%
%% i4vec_sorted_unique_count_test() tests i4vec_sorted_unique_count().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 June 2022
%
%  Author:
%
%    John Burkardt
%
  n = 20;
  b = 0;
  c = n;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4vec_sorted_unique_count_test():\n' );
  fprintf ( 1, '  i4vec_sorted_unique_count() counts unique entries in\n' );
  fprintf ( 1, '  a sorted array.\n' );

  a = randi ( [ b, c ], n, 1 );

  a = i4vec_sort_heap_a ( n, a );

  i4vec_print ( n, a, '  Input vector:' );

  unique_num = i4vec_sorted_unique ( n, a );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of unique entries is ', unique_num );

  return
end
