PROGRAM Quadratic
  USE, INTRINSIC :: ISO_Fortran_env, dp=>REAL64 !modern DOUBLE PRECISION
  IMPLICIT NONE
  REAL(dp) :: a, b, c
  COMPLEX(dp) :: radical, x_1, x_2
  PRINT *, " "
  WRITE(6, '(a6)', advance='no') "  a = "
  READ *, a
  IF (a > 0.0_dp .OR. a < 0.0_dp) THEN !a /= 0
    GO TO 1
  ELSE
    PRINT *, " "
    STOP
  END IF
1 WRITE(6, '(a6)', advance='no') "  b = "
  READ *, b
  WRITE(6, '(a6)', advance='no') "  c = "
  READ *, c
  PRINT *, " "
  radical = b**2 - 4.0_dp * a * c
  x_1 = (-b + SQRT(radical)) / (2.0_dp * a) !plus
  IF (INT(x_1 / CONJG(x_1)) == 1) THEN !are you for real?
    WRITE(6, '(f20.15)') REALPART(x_1)
  ELSE
    WRITE(6, '(2f20.15, a1)') REALPART(x_1), IMAGPART(x_1), "i"
  END IF
  x_2 = (-b - SQRT(radical)) / (2.0_dp * a) !minus
  IF (INT(x_2 / CONJG(x_2)) == 1) THEN !are you for real?
    WRITE(6, '(f20.15)') REALPART(x_2)
  ELSE
    WRITE(6, '(2f20.15, a1)') REALPART(x_2), IMAGPART(x_2), "i"
  END IF
  PRINT *, " "
END PROGRAM Quadratic