下面是求三角形面积的VB程序,但有3处错误,请你找出来并修改。
Private Sub
Command1_Click()
Dim As Single, b As Single, c As Single, p
As Single,
s As Single
a≡Val(Text1. Text)
b=Val(Text2. Text)
c=Val(Text3. Text)
p=(a+b+c)/2
If a<=p Or b>=p Or c>=p Then
Label1. Caption="不能构成三角形"
Else
s=Sqr(p*(p-a)*(p-b)*(p-c))*p
Label1. Caption="面积为"& s
End If
End Sub