Private Sub Command2_Click()
a = Val(InputBox(""))
b = Val(InputBox(""))
c = Val(InputBox(""))
d = b ^ 2 - 4 * a * c
If d < 0 Then
MsgBox "Not root"
Exit Sub
End If
If d = 0 Then
x = -b / (2 * a)
Print "x1=x2="; x
End If
If d > 0 Then
X1 = (-b + d ^ 0.5) / (2 * a)
X2 = (-b - d ^ 0.5) / (2 * a)
Print "x1="; X1
Print "x2"; X2
End If