Department numbers

From Rosetta Code
Revision as of 14:50, 22 May 2017 by rosettacode>Simplex (Created page with "{{task}} There is a highly organized city that has decided to assign a number to each of their departments. Police, Sanitation and Fire Department. Each Department can have...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Department numbers
You are encouraged to solve this task according to the task description, using any language you may know.

There is a highly organized city that has decided to assign a number to each of their departments. Police, Sanitation and Fire Department.

Each Department can have a number between 1 and 7. The 3 numbers have to be different and have to add up to the number 12. For some reason the Chief of the Police Department doesn't like odd numbers and wants to have an even number for his department.

Write a programm which outputs all valid combinations.