(In reply to
Solution, with thanks to the classical Greeks by xdog)
a b c
15 112 113
27 120 123
55 132 143
72 135 153
84 135 159
99 132 165
119 120 169
Two more solutions appear than in xdog's solution: the first and the last.
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 2 To 50000
For a = 1 To tot / 2
b = tot - a
c = (a + b + 99) / 2
If c = Int(c) And a * a + b * b = c * c Then
Text1.Text = Text1.Text & a & Str(b) & " " & c & crlf
DoEvents
End If
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2015-09-06 08:46:20 |