INPUT "a="; a
INPUT "b="; b
INPUT "c="; c
IF c = 0 THEN
IF b = 0 THEN
PRINT "x=0"
ELSE
x1 = 0: x2 = -b / a
PRINT "x1="; x1, "x2="; x2
END IF
ELSE
IF b = 0 THEN
x1 = -c / a: x2 = -x1
PRINT "x1="; x1, "x2="; x2
ELSE
D = b ^ 2 - 4 * a * c
IF D < 0 THEN
PRINT "Нет действительных корней"
ELSE
IF D = 0 THEN
x = -b / (2 * a)
PRINT "x="; x
ELSE
D = SQR(D)
x1 = (-b - D) / (2 * a): x2 = (-b + D) / (2 * a)
PRINT "x1="; x1, "x2="; x2
END IF
END IF
END IF
END IF
END