给你个自定义函数更方便Function x1x2(a, b, c As Integer)If b ^ 2 - 4 * a * c >= 0 Then x1x2 = "x1=" & (-b + Sqr(b ^ 2 - 4 * a * c)) / 2 / a & " x2=" & (-b - Sqr(b ^ 2 - 4 * a * c)) / 2 / a Else MsgBox "参数输入错误,无解!"End IfEnd Function