Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write a program to solve this puzzle.
#3
Well it all depends.

I could just do PRINT [the answer] or I could take each string and have it spit out the answer....

EDIT:

Code:
house:  unknown - unknown - unknown - unknown - unknown
nation: unknown - unknown - unknown - unknown - unknown
pet:    unknown - unknown - unknown - unknown - unknown
drink:  unknown - unknown - unknown - unknown - unknown
cigar:  unknown - unknown - unknown - unknown - unknown


8. The man living in the centre house drinks milk.
9. The Norwegian lives in the first house.

house:  unknown   - unknown - unknown - unknown - unknown
nation: norwegian - unknown - unknown - unknown - unknown
pet:    unknown   - unknown - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - unknown - unknown
cigar:  unknown   - unknown - unknown - unknown - unknown


14. The Norwegian lives next to the Blue house.

house:  unknown   - blue    - unknown - unknown - unknown
nation: norwegian - unknown - unknown - unknown - unknown
pet:    unknown   - unknown - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - unknown - unknown
cigar:  unknown   - unknown - unknown - unknown - unknown


4. The Green house is on the left of the White house.
green <- white
5. The owner of the Green house drinks coffee.

house:  unknown   - blue    - unknown - green   - white
nation: norwegian - unknown - unknown - unknown - unknown
pet:    unknown   - unknown - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - coffee  - unknown
cigar:  unknown   - unknown - unknown - unknown - unknown


1. The Brit lives in the Red house.

house:  yellow    - blue    - red     - green   - white
nation: norwegian - unknown - brit    - unknown - unknown
pet:    unknown   - unknown - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - coffee  - unknown
cigar:  unknown   - unknown - unknown - unknown - unknown


7. The owner of the Yellow house smokes Dunhill.
11. The man who keeps horses lives next to the man who smokes Dunhill.

house:  yellow    - blue    - red     - green   - white
nation: norwegian - unknown - brit    - unknown - unknown
pet:    unknown   - horses  - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - coffee  - unknown
cigar:  dunhill   - unknown - unknown - unknown - unknown


15. The man who smokes Blends has a neighbour who drinks water.

house:  yellow    - blue    - red     - green   - white
nation: norwegian - unknown - brit    - unknown - unknown
pet:    unknown   - horses  - unknown - unknown - unknown
drink:  unknown   - unknown - milk    - coffee  - unknown
cigar:  dunhill   - blends? - blends? - blends? - unknown


3. The Dane drinks tea.

house:  yellow    - blue    - red     - green   - white
nation: norwegian - unknown - brit    - unknown - unknown
pet:    unknown   - horses  - unknown - unknown - unknown
drink:  not tea   - unknown - milk    - coffee  - unknown
cigar:  dunhill   - blends? - blends? - blends? - unknown

house:  yellow     - blue    - red     - green   - white
nation: norwegian  - unknown - brit    - unknown - unknown
pet:    unknown    - horses  - unknown - unknown - unknown
drink:  water/beer - tea?    - milk    - coffee  - tea?
cigar:  dunhill    - blends? - blends? - blends? - unknown


12. The man who smokes Blue Master drinks beer.

house:  yellow    - blue     - red     - green   - white
nation: norwegian - unknown  - brit    - unknown - unknown
pet:    unknown   - horses   - unknown - unknown - unknown
drink:  water     - tea/beer - milk    - coffee  - tea/beer
cigar:  dunhill   - blends?  - blends? - blends? - unknown

house:  yellow    - blue   - red     - green   - white
nation: norwegian - dane   - brit    - unknown - unknown
pet:    unknown   - horses - unknown - unknown - unknown
drink:  water     - tea    - milk    - coffee  - beer
cigar:  dunhill   - blends - unknown - unknown - blue master


13. The German smokes Prince.

house:  yellow    - blue   - red       - green   - white
nation: norwegian - dane   - brit      - german  - unknown
pet:    unknown   - horses - unknown   - unknown - unknown
drink:  water     - tea    - milk      - coffee  - beer
cigar:  dunhill   - blends - pall mall - prince - blue master


6. The person who smokes Pall Mall rears birds.
10. The man who smokes Blends lives next to the man who keeps cats.

house:  yellow    - blue   - red       - green   - white
nation: norwegian - dane   - brit      - german  - unknown
pet:    cats      - horses - birds     - unknown - unknown
drink:  water     - tea    - milk      - coffee  - beer
cigar:  dunhill   - blends - pall mall - prince - blue master


2. The Swede keeps dogs as pets.

house:  yellow    - blue   - red       - green   - white
nation: norwegian - dane   - brit      - german  - swede
pet:    cats      - horses - birds     - unknown - dogs
drink:  water     - tea    - milk      - coffee  - beer
cigar:  dunhill   - blends - pall mall - prince - blue master



-------------------------

house:  yellow    - blue    - red       - green   - white
nation: norwegian - dane    - brit      - german  - swede
pet:    cats      - horses  - birds     - FISH    - dogs
drink:  water     - tea     - milk      - coffee  - beer
cigar:  dunhill   - blends  - pall mall - prince  - blue master

EDITed for clarity.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Messages In This Thread
Write a program to solve this puzzle. - by Moneo - 06-01-2006, 07:14 AM
Write a program to solve this puzzle. - by Agamemnus - 06-01-2006, 07:25 AM
Write a program to solve this puzzle. - by DrV - 06-13-2006, 05:10 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)