function mcnuggets_diophantine_test ( )

%*****************************************************************************80
%
%% mcnuggets_diophantine_test() tests mcnuggets_diophantine().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 November 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../mcnuggets_diophantine' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mcnuggets_diophantine_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  mcnuggets_diophantine() lists the ways that you can\n' );
  fprintf ( 1, '  get exact N chicken McNuggets when they only come in packages\n' );
  fprintf ( 1, '  of 6, 9, and 20.\n' );
  fprintf ( 1, '\n' );

  a = [ 6, 9, 20 ];

  for b = 30 : 45
    x = mcnuggets_diophantine ( a, b );
    m = size ( x, 1 );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  N = %d, Number of ways = %d\n', b, m );
    disp ( x )
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mcnuggets_diophantine_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../mcnuggets_diophantine' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

