function value = i4_is_power_of_10 ( n )

%*****************************************************************************80
%
%% I4_IS_POWER_OF_10 reports whether an integer is a power of 10.
%
%  Discussion:
%
%    The powers of 10 are 1, 10, 100, 1000, 10000, and so on.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 June 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the integer to be tested.
%
%    Output, logical VALUE, is true if N is a power of 10.
%
  value = false;

  if ( n <= 0 )
    return
  end

  while ( 1 < n )

    if ( mod ( n, 10 ) ~= 0 )
      return
    end

    n = floor ( n / 10 );

  end

  value = true;

  return
end
