function [ ch, seed ] = ch_uniform ( clo, chi, seed )

%*****************************************************************************80
%
%% CH_UNIFORM returns a random character in a given range.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 December 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    character CLO, CHI, the minimum and maximum acceptable characters.
%
%    integer SEED, a seed for the random number generator.
%
%  Output:
%
%    character CH, the randomly chosen character.
%
%    integer SEED, a seed for the random number generator.
%
  clo_num = a_to_i4 ( clo );
  chi_num = a_to_i4 ( chi );

  r = rand ( 1, 1 );

  ch_num = round ( clo_num - 0.5 + r * ( chi_num - clo_num ) );

  ch_num = max ( ch_num, clo_num );
  ch_num = min ( ch_num, chi_num );
  ch = i4_to_a ( ch_num );

  return
end
