Solving Problem inheritance by Prolog
The parents of Mark are Linda and Peter. The parents of Fiona are Linda and Peter. The parents of Andrea are Fiona and Andrew. The parents of John are Fiona and Andrew. The parents of Eileen are Andrea and Alan. The parents of Jane are Andrea and Alan.
Total Inheritance Everyone in my family, who holds a PhD should receive $100,000. Everyone in my family, receives $3,000 for every aunt they have who holds a PhD. Everyone in my family, receives $2,000 for every uncle they have who holds a PhD. Everyone in my family, receives $100 for every sibling holding a University degree.
Peter, Mark, and Fiona hold a PhD. Mark, Linda, and Andrea all hold a MSc. Andrew, John, Alan, Eileen hold a BSc. Jane holds a Tafe certificate.
标签:
parents
inheritance
The
Solving
上传时间:
2014-01-08
上传用户:15071087253