Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Text1.Text = ""
For i = 1 To 30
For j = i + 1 To 30
For k = j + 1 To 30
If ggs(i, j, k) = True Then
Text1.Text = Text1.Text & i & "," & j & "," & k & vbCrLf
End If
Next k
Next j
Next i
End Sub
Public Function ggs(a As Integer, b As Integer, c As Integer) As Boolean
If a * a + b * b = c * c Then ggs = True
End Function
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/cefc1e178a82b90149250d9d768da9773812ef90?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)