Anonymous user
Frobenius numbers: Difference between revisions
m
→{{header|REXX}}: moved a statement.
m (→{{header|REXX}}: changed some comments, simplified some code.) |
m (→{{header|REXX}}: moved a statement.) |
||
Line 230:
if cols=='' | cols=="," then cols= 10 /* " " " " " " */
call genP /*build array of semaphores for primes.*/
@Frob= ' Frobenius numbers that are < ' commas(hi)
if cols>0 then say ' index │'center(@Frob, 1 + cols*(w+1) )
Line 254 ⟶ 253:
/*──────────────────────────────────────────────────────────────────────────────────────*/
genP: @.1=2; @.2=3; @.3=5; @.4=7; @.5=11; @.6= 13 /*define some low primes. */
w=
/* [↓] generate more primes ≤ high.*/
do j=@.#+4 by 2 to hi+1 /*find odd primes from here on. */
|