A = Text1.Text
B = Text2.Text
C = Text3.Text
x = B ^ 2 - 4 * A * C
If x < 0 Then
Text4.Text = 虛根
Else
If x = 0 Then
Text4.Text = -B / (2 * A)
Else
If x > 0 Then
Text4.Text = (-B + Sqr(x)) / (2 * A)
Text5.Text = (-B - Sqr(x)) / (2 * A)
End If
End If
End If
arrow
arrow
    全站熱搜

    vbqa 發表在 痞客邦 留言(1) 人氣()