RosettaCodeData/Task/Department-numbers/PureBasic/department-numbers.basic

19 lines
457 B
Plaintext

OpenConsole()
PrintN("--police-- --sanitation-- --fire--")
For police = 2 To 7 Step 2
For fire = 1 To 7
If fire = police:
Continue
EndIf
sanitation = 12 - police - fire
If sanitation = fire Or sanitation = police: Continue : EndIf
If sanitation >= 1 And sanitation <= 7:
PrintN(" " + Str(police) + #TAB$ + #TAB$ + Str(fire) + #TAB$ + #TAB$ + Str(sanitation))
EndIf
Next fire
Next police
Input()
CloseConsole()