Anonymous user
Hamming numbers: Difference between revisions
m
→{{header|REXX}}: added whitespace, change comments (for the calculations). -- ~~~~
m (→{{header|REXX}}: capitalized "Hamming" in all the output lines. -- ~~~~) |
m (→{{header|REXX}}: added whitespace, change comments (for the calculations). -- ~~~~) |
||
Line 2,170:
do n=2 for y-1
@.n=min(2*@.#2, 3*@.#3, 5*@.#5) /*pick the minimum of three pigs.*/
if 2*@.#2 == @.n then #2=#2+1
if 3*@.#3 == @.n then #3=#3+1
if 5*@.#5 == @.n then #5=#5+1
end /*n*/
do j=x to y
|