function flips_test ( )

%*****************************************************************************80
%
%% flips_test() tests flips().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 January 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'flips_test():\n' );
  fprintf ( 1, '  flips() estimates EVEN, the probability of an even number of heads\n' );
  fprintf ( 1, '  after N tosses of a biased coin, whose probability of heads' );
  fprintf ( 1, '  on a single toss is P.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    N     P     EVEN\n' );
  fprintf ( 1, '\n' );

  n_test = [ 9, 9 ];
  p_test = [ 0.1, 0.99 ];

  for i = 1 : 2
    n = n_test(i);
    p = p_test(i);
    even = flips ( n, p );
    fprintf ( 1, '  %d  %g  %g\n', n, p, even );
  end

  return
end

