program write_file open(unit=10,file='message.txt') write(10,*) 'Hello,World!(ver.2)' write(*,*)'My message is in message.txt' close(10) end