Dim i
Dim j
Dim k
For i = 1 To 20
For j = i To 20
For k = j To 20
If i ^ 2 + j ^ 2 = k ^ 2 Then Print i; j; k
Next k
Next j
Next i
所有的符合要求的答案是:
3,4,5
5,12,13
6,8,10
8,15,17
9,12,15
12,16,20
Dim i
Dim j
Dim k
For i = 1 To 20
For j = i To 20
For k = j To 20
If i ^ 2 + j ^ 2 = k ^ 2 Then Print i; j; k
Next k
Next j
Next i
所有的符合要求的答案是:
3,4,5
5,12,13
6,8,10
8,15,17
9,12,15
12,16,20