diff --git a/fortran/src/p0004.f90 b/fortran/src/p0004.f90 index 81303a11..d0b2358e 100644 --- a/fortran/src/p0004.f90 +++ b/fortran/src/p0004.f90 @@ -19,7 +19,7 @@ integer function p0004() result(answer) prod = i * j is_palindrome = .true. write(string, '(I0)') prod - length = len(string) + length = len_trim(string) do k = 1, length n = length - k + 1