000
Private Sub Command1_Click()
Dim a, b, c, X, Y, Z As Variant
a = Val(Text1)
b = Val(Text2)
c = Val(Text3)
If a >= b And a >= c Then
X = a
Y = b
Z = c
End If
If b >= a And b >= c Then
X = b
Y = a
Z = c
End If
If c >= b And c >= a Then
X = c
Y = a
Z = b
End If
If X < Y + Z Then
Select Case X ^ 2 - (Y ^ 2 + Z ^ 2)
Case Is > 0
Label5 = "鈍角三角形"
Case Is < 0
Label5 = "銳角三角形"
Case Is = 0
Label5 = "直角三角形"
End Select
Else: Label5 = "不為三角形"
End If
End Sub
Dim a, b, c, X, Y, Z As Variant
a = Val(Text1)
b = Val(Text2)
c = Val(Text3)
If a >= b And a >= c Then
X = a
Y = b
Z = c
End If
If b >= a And b >= c Then
X = b
Y = a
Z = c
End If
If c >= b And c >= a Then
X = c
Y = a
Z = b
End If
If X < Y + Z Then
Select Case X ^ 2 - (Y ^ 2 + Z ^ 2)
Case Is > 0
Label5 = "鈍角三角形"
Case Is < 0
Label5 = "銳角三角形"
Case Is = 0
Label5 = "直角三角形"
End Select
Else: Label5 = "不為三角形"
End If
End Sub
留言