PROGRAM kladoti
  IMPLICIT NONE

  DOUBLE PRECISION :: x,y

  PRINT *, "Dwse to x"
  READ *, x

  IF (x>3d0) y = (x**2 + 1d0) * EXP(-x)

  IF ( (1d0 <= x) .AND. (x <= 3d0) ) y = SQRT(x-1d0)

  IF ((x < 1d0) .AND. (x /= -5d0) .AND. (x /= -7d0)) THEN
     y = (x-2d0)/(x+5d0) + (x-3d0)/(x+7d0)
  ENDIF
  
  PRINT *, "H timi tis synartisis einai", y
END PROGRAM kladoti
