program write_file character*20 filename write(*,*)'What file name? (less than 20 char)' read(*,*) filename open(unit=10,file=filename) write(10,*) 'Hello,World!(ver.3)' write(*,*)'My message is in now written into ', *filename close(10) end