function four_fifths_test ( )

%*****************************************************************************80
%
%% four_fifths_test() tests four_fifths().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    20 September 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../four_fifths' );

  timestamp ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'four_fifths_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version: %s\n', version ( ) );
  fprintf ( 1, '  four_fifths() seeks a solution of the four fifths problem:\n' );
  fprintf ( 1, '  Find integers a, b, c, d and e such that\n' );
  fprintf ( 1, '    a^5 + b^5 + c^5 + d^5 = e^5.\n' );

  n = 400;
  [ a, b, c, d, e, count ] = four_fifths ( n );
  
  fprintf ( 1, '' );
  fprintf ( 1, '  Result:' );
  fprintf ( 1, '    %d^5  + %d^5  + %d^5  + %d^5  = %d^5\n', a, b, c, d, e );
  fprintf ( 1, '  A solution was found after %d steps.\n', count );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'four_fifths_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  timestamp ( );

  rmpath ( '../four_fifths' );

  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
