Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于:
fruitid('Apple', 'Granny Smith', 1).
我将如何创建子句:
print_fruit_details(FruitID) :-
给定输入 1,它将输出“Apple”和“Granny Smith”。
谢谢,
JAS
试试这个:
print_fruit_details(FruitID) :- fruitid(X, Y, FruitID), write(X), write(Y).
欢迎来到 StackOverflow :)