function gcd_test ( )

%*****************************************************************************80
%
%% gcd_test() tests gcd().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 December 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'gcd_test():\n' );
  fprintf ( 1, '  gcd(m,n) computes the greatest common divisor of M and N.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '         m         n     gcd(m,n) gcd(m,n)\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, m, n, f1 ] = gcd_values ( n_data );

    if ( n_data == 0 )
      break
    end

    f2 = gcd ( m, n );

    fprintf ( 1, '  %8d  %8d  %8d  %8d\n', m, n, f1, f2 );

  end

  return
end
