求写一条Access语句(关于VBA编程的) 已知三角形的三条边长分别是a,b,c,请写出判断这

2024-10-31 01:32:50
有1个网友回答
网友(1):

Sub 求三角形面积()
Dim a As Single
Dim b As Single
Dim c As Single
a = Range("禅好唤A1")
b = Range("A2")
c = Range("A3")
If a + b >= c And a + c >= b And b + c >= a Then
Range("a4") = (1 / 4) * Sqr((a + b + c) * (a + b - c) * (a + c - b) * (b + c - a))
Else
Range("a4") = "袜念不是三贺凯角形"
End If
End Sub