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

25 lines
615 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
' version 15-08-2017
' compile with: fbc -s console
Dim As Integer fire, police, sanitation
Print "police fire sanitation"
Print "----------------------"
For police = 2 To 7 Step 2
For fire = 1 To 7
If fire = police Then Continue For
sanitation = 12 - police - fire
If sanitation = fire Or sanitation = police Then Continue For
If sanitation >= 1 And sanitation <= 7 Then
Print Using " # # # "; police; fire; sanitation
End If
Next
Next
' empty keyboard buffer
While Inkey <> "" : Wend
Print : Print "hit any key to end program"
Sleep
End