Guest_imported
New member
- Jan 1, 1970
- 0
I've successfully created a menu system that links to my family geneology, so that the menu asks for a name, then the relation and Prolog lists the relations eg the mother of this person is....
However when there is more than 1 person in a relationship eg a person has 2 brothers or 2 grandfathers only the fisrt persn is listed, how do i change this?
The Prolog i've used is as follows;
choice(c,Name):-brother(X,Name),
write('The brother(s) of this person is/are '),
write(X),nl.
Hope you can help Dylan
However when there is more than 1 person in a relationship eg a person has 2 brothers or 2 grandfathers only the fisrt persn is listed, how do i change this?
The Prolog i've used is as follows;
choice(c,Name):-brother(X,Name),
write('The brother(s) of this person is/are '),
write(X),nl.
Hope you can help Dylan