!----- Ex5_7: Square Root ----- REAL :: r, x, d = 0.000005 PRINT*,'Input a real number:' READ*, r IF(r>0) THEN x = r DO WHILE( ABS(x**2 - r) > d ) x = 0.5*( x + r/x) END DO PRINT '(F8.5)', x END IF END