O'Halloran numbers: Difference between revisions

Added XPL0 example.
m (→‎{{header|Raku}}: delete link back to this page. ?!)
(Added XPL0 example.)
Line 243:
All known O'Halloran numbers:
[8, 12, 20, 36, 44, 60, 84, 116, 140, 156, 204, 260, 380, 420, 660, 924]
</pre>
 
=={{header|XPL0}}==
<syntaxhighlight lang "XPL0">int L, W, H, HA, I;
char T(1000/2); \table of half areas
[for I:= 0 to 1000/2-1 do
T(I):= true; \assume all are O'Halloran numbers
for L:= 1 to 250 do
for W:= 1 to 250/L do
for H:= 1 to 250/L do
[HA:= L*W + L*H + W*H;
if HA < 500 then \not an O'Halloran number
T(HA):= false;
];
for I:= 6/2 to 1000/2-1 do
if T(I) then
[IntOut(0, I*2); ChOut(0, ^ )];
]</syntaxhighlight>
{{out}}
<pre>
8 12 20 36 44 60 84 116 140 156 204 260 380 420 660 924
</pre>
297

edits