! 	This program demonstrates DO WHILE
!	===================================================
        program do2

	implicit none

	double precision x, l1, l2

	print *, "Program find approximate value for square root"
	print *
	print *, "Enter number x = "
	read  *, x

	l1 = 1; l2 = x/l1

	do while ( abs(l1 - l2) > 1e-10 )
	   l1 = (l1 + l2)/2.0
	   l2 = x/l1
	   print *, "New apprximation = ", l1
	end do

	print *
	print *, "Square root from Fortran library = ", sqrt(x)

	end
