Label1.Caption =...求两根这样写为何不对该怎么写?
请指教else:label1.caption=...哪里错了?Private Sub Command1_Click()
a = Val(Text1): b = Val(Text2): c = Val(Text3)
p = b * b - 4 * a * c
If p < 0 Then
MsgBox ""b*b-4*a*c<0",请重新输入!", vbCritical '错误:缺少语句结束
Else: Label1.Caption = 1 / 2 * (-b + Sqr(p)) / a & "," & 1 / 2 * (-b - Sqr(p)) / a '当 _
输入为空或全为零时出现溢出错误
End If
End Sub
[[it] 本帖最后由 yi157 于 2008-6-5 17:30 编辑 [/it]]
[[it] 本帖最后由 yi157 于 2008-6-6 14:39 编辑 [/it]]