Department numbers: Difference between revisions

Added solution for Action!
(add fermat, tinybasic, gwbasic)
(Added solution for Action!)
Line 198:
</pre>
 
 
=={{header|Action!}}==
<lang Action!>PROC Main()
BYTE p,s,f
 
PrintE("P S F")
FOR p=2 TO 6 STEP 2
DO
FOR s=1 TO 7
DO
FOR f=1 TO 7
DO
IF p#s AND p#f AND s#f AND p+s+f=12 THEN
PrintF("%B %B %B%E",p,s,f)
FI
OD
OD
OD
RETURN</lang>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Department_numbers.png Screenshot from Atari 8-bit computer]
<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|Ada}}==
Anonymous user