! Solution 4/6
   program divide
      real :: x
      do
         read *, x
         if (x==-1.0) then
            print *, "input value -1.0 invalid"
         else
            print *, x/(1.0 + x)
            exit
         end if
      end do
   end program divide
