求用VB编写一个求三角形周长的程序的源码
发布网友
发布时间:2023-07-11 19:17
我来回答
共1个回答
热心网友
时间:2024-11-15 23:55
Dim a As Single, b As Single, c As Single
a = Val(Text1): b = Val(Text2): c = Val(Text3)
If ((a + b > c And Abs(a - b) < c) And (b + c > a And Abs(b - c) < a) And (c + a > b And Abs(c - a) < b)) Then
Label4 = "边长=" & (a + b + c)
Else
Label4 = "当前边长不能构成三角形!"
End If追问哎呦不错哟,很认真嘛,虽然和我的要求有一点点差距不过还是给你吧!