A, B, C and D are:
14 89 11 70
respectively
from
DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 2 To 2017
For a = 1 To tot - 1
DoEvents
b = tot - 1
ab = a * b
cd = 2016 - ab
If cd > 0 Then
For c = 1 To cd
If cd Mod c = 0 Then
d = cd / c
If a * d - b * c = 1 Then
Text1.Text = Text1.Text & a & Str(b) & Str(c) & Str(d) & crlf
End If
End If
Next
End If
Next
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
|
Posted by Charlie
on 2016-05-26 10:55:52 |