Dinesman's multiple-dwelling problem: Difference between revisions

Content added Content deleted
(→‎{{header|REXX}}: split compound DO statements (1 per line), added/changed whitespace and comments, use a template for the output section.)
m (added whitespace.)
Line 14: Line 14:
;The problem
;The problem
Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment house that contains only five floors.<br>
Baker, Cooper, Fletcher, Miller, and Smith live on different floors of an apartment house that contains only five floors.<br>
* Baker does not live on the top floor.
::* &nbsp; Baker does not live on the top floor.
* Cooper does not live on the bottom floor.
::* &nbsp; Cooper does not live on the bottom floor.
* Fletcher does not live on either the top or the bottom floor.
::* &nbsp; Fletcher does not live on either the top or the bottom floor.
* Miller lives on a higher floor than does Cooper.
::* &nbsp; Miller lives on a higher floor than does Cooper.
* Smith does not live on a floor adjacent to Fletcher's.
::* &nbsp; Smith does not live on a floor adjacent to Fletcher's.
* Fletcher does not live on a floor adjacent to Cooper's.<br><br>
::* Fletcher does not live on a floor adjacent to Cooper's.


''Where does everyone live?''<br>
''Where does everyone live?''<br>
<br><br>
<br><br>