PROGRAM square_sum IMPLICIT NONE REAL sq_sum, number OPEN (1, FILE = 'square.dat') sq_sum = 0.0 DO READ (1, '(F4.2)') number WRITE (*, *) 'number = ', number IF (number == 0.0) EXIT IF (number < 0.0) CYCLE sq_sum = sq_sum + SQRT(number) WRITE (*,*) 'square_sum =', sq_sum END DO PRINT '(/)' PRINT *,'The solution is:' WRITE (*,*) sq_sum END PROGRAM square_sum