Department numbers: Difference between revisions

Add CLU
(Add CLU)
Line 1,046:
6 5 1
</pre>
 
=={{header|CLU}}==
<lang clu>start_up = proc ()
po: stream := stream$primary_output()
stream$putl(po, "P S F\n- - -")
for police: int in int$from_to_by(2,7,2) do
for sanitation: int in int$from_to(1,7) do
for fire: int in int$from_to(1,7) do
if police~=sanitation
& sanitation~=fire
& police~=fire
& police+sanitation+fire = 12
then
stream$putl(po, int$unparse(police) || " " ||
int$unparse(sanitation) || " " ||
int$unparse(fire))
end
end
end
end
end start_up</lang>
{{out}}
<pre>P S F
- - -
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|Cowgol}}==
2,098

edits