Department numbers: Difference between revisions

Add Draco
(Add COBOL)
(Add Draco)
Line 1,285:
readln;
end.</lang>
 
=={{header|Draco}}==
<lang draco>proc main() void:
byte police, sanitation, fire;
 
writeln("Police Sanitation Fire");
for police from 2 by 2 upto 7 do
for sanitation from 1 upto 7 do
for fire from 1 upto 7 do
if police /= sanitation
and police /= fire
and sanitation /= fire
and police + sanitation + fire = 12 then
writeln(police:6, " ", sanitation:10, " ", fire:4)
fi
od
od
od
corp</lang>
{{out}}
<pre>Police Sanitation Fire
2 3 7
2 4 6
2 6 4
2 7 3
4 1 7
4 2 6
4 3 5
4 5 3
4 6 2
4 7 1
6 1 5
6 2 4
6 4 2
6 5 1</pre>
 
=={{header|Elixir}}==
2,095

edits