Private Sub Command1_Click()
Dim a%,b%,c%,t%,p!,s!
a = InputBox("请输入第一个数字","输入")
b = InputBox("请输入第二个数字","输入")
c = InputBox("请输入第三个数字","输入")
If a > b Then '先给三个数字排序
t = a
a = b
b = t
End If
If a > c Then
t = a
a = c
c = t
End If
If b > c Then
t = b
b = c
c = t
End If
If b + c > a And c - b < a Then '判断能否构成三角形
p = (a + b + c) / 2
s = Sqr(p * (p - a) * (p - b) * (p - c))
Print "能构成三角形,它的面积是"; s
Else
Print "三个数中最大的是"; c
End If
End Su