function spaghetti_test ( )

%*****************************************************************************80
%
%% spaghetti_test() tests spaghetti().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 January 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'spaghetti_test():\n' );
  fprintf ( 1, '  spaghetti() estimates E, the expected number of loops created\n' );
  fprintf ( 1, '  if N strands of spaghetti are randomly joined at the ends.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  N   E\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 4
    n = 10^i;
    e = spaghetti ( n );
    fprintf ( 1, '  %d  %g\n', n, e );
  end

  return
end

