Anonymous user
Bin given limits: Difference between revisions
m
→{{header|REXX}}: simplified some code.
m (Reordered submissions alphabetically.) |
m (→{{header|REXX}}: simplified some code.) |
||
Line 300:
do j=1 for datum; x= word(nums, j)
do k=0 for # /*find the bin that this number is in. */
if x < @.k then do; !.k= !.k + 1; iterate j; end /*bump the bin counter.
end /*k*/
end /*j*/; return
/*──────────────────────────────────────────────────────────────────────────────────────*/
show: say center(' 'arg(1)" ",
say center('' ,
jp=
▲ say pad ge right(@.jm, wb) left('', 3 + length(..) + wb) eq cnt
{{out|output|text= when using the internal default input:}}
<pre>
the 1st set of bin counts for the specified data:
═══════════════════════════════════════════════════
< 23 count= 11
≥ 23 .. < 37 count= 4
≥ 37 .. < 43 count= 2
≥ 43 .. < 53 count= 6
≥ 53 .. < 67 count= 9
≥ 67 .. < 83 count= 5
≥ 83 count= 13
the 2nd set of bin counts for the specified data:
═══════════════════════════════════════════════════
< 14 count= 3
≥ 14 .. < 18 count= 0
≥ 18 .. < 249 count= 44
≥ 249 .. < 312 count= 10
≥ 312 .. < 389 count= 16
≥ 389 .. < 392 count= 2
≥ 392 .. < 513 count= 28
≥ 513 .. < 591 count= 16
≥ 591 .. < 634 count= 6
≥ 634 .. < 720 count= 16
≥ 720 count= 59
</pre>
|