Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logic exercises

Status
Not open for further replies.

Bulgarin

Programmer
Dec 18, 2011
1
Hi. I need your help for 2 logic exercises. I need it in Prolog.

First:
Lion lies on monday, Tuesday, wednesday and
Tiger lies on thursday, friday and saturday.
A man goes to the jungle and talks to the tiger
tiger says that "i lied yesterday" and lion also says that "i lied yesterday" what is the day today?
Answer is Thursday.

Second:
In one family has 5 children: 4,5,6,7,8-years old with other talants. One of them is Lisa, other play the piano.
1. Jane is 4 years old and don't understand Math.
2. The child, who is a programmer is one-year bigger than George.
3. The child, who play the guitar is 7 years old.
4. Ashley isn't 8 years old.
5. Mike is 5 years old and he is lesser than this, who understant literature.

Please need it fast and sorry for my bad english! :)
 
I need what you tried to be able to help you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top