麻烦各位帮我看看哪里错了,我输入三边3,4,5竟然是一般三角形
程序代码:
Private Sub Command1_Click() a = Val(Text1) b = Val(Text2) c = Val(Text3) If a + b <= c Or a + c <= b Or b + c <= a Then y = "不能构成三角形" Else If a = b = c Then y = "等边三角形" End If If (a = b And a <> c) Or (a = c And a <> b) Or (b = c And b <> a) Then y = "等腰三角形" End If If (a ^ 2 + b ^ 2 = c ^ 2 And a <> b) Or (a ^ 2 + c ^ 2 = b ^ 2 And a <> c) Or (b ^ 2 + c ^ 2 = a ^ 2 And b <> c) Then y = "直角三角形" End If If (a ^ 2 + b ^ 2 = c ^ 2 And a = b) Or (a ^ 2 + c ^ 2 = b ^ 2 And a = c) Or (b ^ 2 + c ^ 2 = a ^ 2 And b = c) Then y = "等腰直角三角形" Else y = "一般三角形" End If End If Picture1.Print y End Sub