DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For tot = 2 To 35000
For a = 1 To tot - 1
DoEvents
b = tot - a
c = 12 * b - 20 * a
If b > 0 And c > 0 Then
If (c + 1) * (20 * a) = 36 * b * b Then
Text1.Text = Text1.Text & mform(a, "####") & mform(b, "######") & mform(c, "#######") & " " & mform(a + b + c, "######") & " " & mform(20 * a, "######") & mform(6 * b, "#######") & mform(c, "#######") & crlf
End If
End If
Next a
Next tot
Text1.Text = Text1.Text & crlf & " done"
End Sub
Function mform$(x, t$)
a$ = Format$(x, t$)
If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
mform$ = a$
End Function
finds
A B C A+B+C 20*A 6*B C
5 15 80 100 100 90 80
20 70 440 530 400 420 440
45 145 840 1030 900 870 840
45 155 960 1160 900 930 960
80 260 1520 1860 1600 1560 1520
125 425 2600 3150 2500 2550 2600
180 590 3480 4250 3600 3540 3480
180 610 3720 4510 3600 3660 3720
245 805 4760 5810 4900 4830 4760
320 1080 6560 7960 6400 6480 6560
405 1335 7920 9660 8100 8010 7920
405 1365 8280 10050 8100 8190 8280
500 1650 9800 11950 10000 9900 9800
605 2035 12320 14960 12100 12210 12320
720 2380 14160 17260 14400 14280 14160
720 2420 14640 17780 14400 14520 14640
845 2795 16640 20280 16900 16770 16640
980 3290 19880 24150 19600 19740 19880
1125 3725 22200 27050 22500 22350 22200
1125 3775 22800 27700 22500 22650 22800
1280 4240 25280 30800 25600 25440 25280
1445 4845 29240 35530 28900 29070 29240
1620 5370 32040 39030 32400 32220 32040
1620 5430 32760 39810 32400 32580 32760
1805 5985 35720 43510 36100 35910 35720
2000 6700 40400 49100 40000 40200 40400
2205 7315 43680 53200 44100 43890 43680
2205 7385 44520 54110 44100 44310 44520
2420 8030 47960 58410 48400 48180 47960
2645 8855 53360 64860 52900 53130 53360
2880 9560 57120 69560 57600 57360 57120
2880 9640 58080 70600 57600 57840 58080
3125 10375 62000 75500 62500 62250 62000
3380 11310 68120 82810 67600 67860 68120
3645 12105 72360 88110 72900 72630 72360
3645 12195 73440 89280 72900 73170 73440
3920 13020 77840 94780 78400 78120 77840
4205 14065 84680 102950 84100 84390 84680
4500 14950 89400 108850 90000 89700 89400
4500 15050 90600 110150 90000 90300 90600
Edited on March 24, 2016, 3:50 pm
|
Posted by Charlie
on 2016-03-24 15:32:13 |