program word_length implicit none character(len=20) word ! 最大20文字まで print *, "Please enter a word:" read *, word print *, "Length =", len_trim(word) ! len(word)では× end program word_length