VB程序编程1,求1到100中5的倍数2,已知三角形的三边求三角形的面积

2025-05-23 01:30:02
推荐回答(2个)
回答1:

1
Private Sub Command1_Click()
Dim i As Integer
For i = 1 To 100
If i Mod 5 = 0 Then Print i
Next i
End Sub

2
Private Sub Command1_Click()
Dim s, p, a, b, c As Single
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
p = (a + b + c) / 2
s = Sqr((p * (p - a) * (p - b) * (p - c)))
Print s
End Sub

回答2:

1:5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100