Navgation
[Home] [Console] [Guide] [Applications] [Index] [Back]

Dinesman Dwelling Problem

https://rosettacode.org/wiki/Dinesman%27s_multiple-dwelling_problem

Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment house that contains only five floors.
  • Baker does not live on the top floor.
  • Cooper does not live on the bottom floor.
  • Fletcher does not live on either the top or the bottom floor.
  • Miller lives on a higher floor than does Cooper.
  • Smith does not live on a floor adjacent to Fletcher's.
  • Fletcher does not live on a floor adjacent to Cooper's.
Where does everyone live?

Test Window


Output Window