Private Sub CommandButton1_Click()
Dim a!,b!,c!,p!,s!,tmp
a = Val(text1.Text) '转换为数字
b = Val(text2.Text)
c = Val(text3.Text)
'先从小到大排序 abc,利于后面判断
If a > b Then tmp = a:a = b:b = tmp
If a > c Then tmp = a:a = c:c = tmp
If b > c Then tmp = b:b = c:c = tmp
If a c ^ 2 Then
text5.Text = "锐角三角形"
Else
text5.Text = "钝角三角形"
End If
p = (a + b + c) / 2
s = Sqr(p * (p - a) * (p - b) * (p - c))
text6.Text = s
End If
End Su