Given:
fruitid('Apple', 'Granny Smith', 1).
How would I go about creating the clause:
print_fruit_details(FruitID) :-
Which would output 'Apple' and 'Granny Smith' given the input 1.
Thanks,
JAS
Given:
fruitid('Apple', 'Granny Smith', 1).
How would I go about creating the clause:
print_fruit_details(FruitID) :-
Which would output 'Apple' and 'Granny Smith' given the input 1.
Thanks,
JAS
Try this:
print_fruit_details(FruitID) :- fruitid(X, Y, FruitID), write(X), write(Y).
And welcome to StackOverflow :)