RE: Need a Challenge?

new topic     » topic index » view thread      » older message » newer message

how would a computer program solve that, unless you count an AI?

Irv Mullins wrote:
> I found this puzzle in an example program for a language I downloaded.
> Can you write a program (100 lines or less, plz) to solve it?
> 
> A small street has five differently colored houses on it. Five men
> of different nationalities live in these five houses. Each man has
> a different profession, each man likes a different drink, and each
> has a different pet animal. We have the following information:
>  
> The Englishman lives in the red house.
> The Spaniard has a dog.
> The Japanese is a painter.
> The Italian drinks tea.
> The Norwegian lives in the first house on the left.
> The owner of the green house drinks coffee.
> The green house is on the right of the white house.
> The sculptor breeds snails.
> The diplomat lives in the yellow house.
> They drink milk in the middle house.
> The Norwegian lives next door to the blue house.
> The violinist drinks fruit juice.
> The fox is in the house next to the doctor's.
> The horse is in the house next to the diplomat's.
>  
> The question is who has the zebra and who drinks water?
> 
> Regards,
> Irv
> 
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu