vb三角形判断?
展开全部
Dim str As String = "", sum As Integer = 0, x As Integer
For i = 1 To 20
For j = i To 20
For x = 1 To 20
If (i + j) > x And (i + x > j) And (j + x > i) And (i ^ 2 + j ^ 2 = x ^ 2) Then
str = str & i & " " & j & " " & x & vbCrLf
End If
Next
Next
Next
TextBox6.Text = str
For i = 1 To 20
For j = i To 20
For x = 1 To 20
If (i + j) > x And (i + x > j) And (j + x > i) And (i ^ 2 + j ^ 2 = x ^ 2) Then
str = str & i & " " & j & " " & x & vbCrLf
End If
Next
Next
Next
TextBox6.Text = str
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询