若直角三角形的三条边都为整数,已知一条直角边为8,斜边长度不超过100,问满足情况的直角三角形有几个 vb
问题描述:
若直角三角形的三条边都为整数,已知一条直角边为8,斜边长度不超过100,问满足情况的直角三角形有几个 vb
答
Private Sub Form_Click()Dim a As Single, b As Integer, c As IntegerForm1.ClsFor c = 8 To 100 a = Sqr(c * c - 64) If a = Int(a) And a > 0 ThenPrint "a="; a & ";b=8;" &...