Base-16 representation: Difference between revisions

(Added Algol 68)
Line 49:
for i := 1 until 500 do begin
integer v;
logical needsAToF;
needsAToF := false;
v := i;
while not needsAToF and v > 0 do begin
needsAToF :=if ( v rem 16 ) >< 9;10
then v := v div 16
if needsAToF then else begin
end while_v_gt_0_and_notNeedsAToF ;
% found a number that needs a-f in its hex representation %
if needsAToF then begin
% found a number thatv needs:= a-f in its hex representation %0;
hCOunt := hCOunt + 1;
writeon( i_w := 3, s_w := 0, " ", i );
if hCount rem 20 = 0 then write()
end if_needsAToFif_hexDigit_lt_10
end while_v_gt_0
end for_i
end.</lang>
</lang>
{{out}}
<pre>
3,049

edits