VB判断方程是否有实数根在线等Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim i As Stringa = Val(Text1.Text)b = Val(Text2.Text)If b * b - 4 * a * c >= 0 Theni = "有"Elsei = "没有"End IfText3.Text = iEnd Sub哪里错了
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/27 14:12:32
VB判断方程是否有实数根在线等Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim i As Stringa = Val(Text1.Text)b = Val(Text2.Text)If b * b - 4 * a * c >= 0 Theni = "有"Elsei = "没有"End IfText3.Text = iEnd Sub哪里错了
VB判断方程是否有实数根在线等
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim i As String
a = Val(Text1.Text)
b = Val(Text2.Text)
If b * b - 4 * a * c >= 0 Then
i = "有"
Else
i = "没有"
End If
Text3.Text = i
End Sub
哪里错了
VB判断方程是否有实数根在线等Private Sub Command1_Click()Dim a As IntegerDim b As IntegerDim i As Stringa = Val(Text1.Text)b = Val(Text2.Text)If b * b - 4 * a * c >= 0 Theni = "有"Elsei = "没有"End IfText3.Text = iEnd Sub哪里错了
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim i As String
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
If b * b - 4 * a * c >= 0 Then
i = "有"
Else
i = "没有"
End If
Text4.Text = i
End Sub
你的C没有定义,没有赋值