Anonymous user
Department numbers: Difference between revisions
m
→{{header|REXX}}: added/changed whitespace.
Not a robot (talk | contribs) (Add 8086 assembly) |
m (→{{header|REXX}}: added/changed whitespace.) |
||
Line 2,775:
do p=2 to 7 by 2 /*try numbers for the police department*/
do f=1 for 7 /* " " " " fire " */
do s=1 for 7; $= p + f +
if f\==p & s\==p & s\==f & $==12 then say center(p,6) center(f,5) center(s,10)
end /*s*/
Line 2,805:
Also, extra code was added to nicely format a title (header) for the output, as well as displaying the number of solutions found.
<lang rexx>/*REXX program finds/displays all possible variants of (3) department numbering puzzle.*/
end
▲ say center(@pd, L) center(@fd, L) center(@sd, L)
▲ end /*SD*/
▲ end /*FD*/
{{out|output|text= when using the default inputs:}}
<pre>
Line 2,855 ⟶ 2,834:
6 5 1
14 solutions found.
</pre>
|