      program prog
      write(10, end=20) num
   20 continue
      end
