% Facts
1. Ram likes mango.
2. Seema is a girl.
3. Bill likes Cindy.
4. Rose is red.
5. John owns gold.
% Clauses
likes(ram ,mango).
girl(seema).
red(rose).
likes(bill ,cindy).
owns(john ,gold).
% Queries
?-likes(ram,What).
What= mango
?-likes(Who,cindy).
Who= cindy
?-red(What).
What= rose
?-owns(Who,What).
Who= john
What= gold
1) Write a program in prolog to implement simple facts and Queries View Solution
2) Write a program in prolog to implement simple arithmetic View Solution
3) Write a program in prolog to solve Monkey banana problem View Solution
4) Write a program in prolog to solve Tower of Hanoi View Solution
5) Write a program in prolog to solve 8 Puzzle problems View Solution
6) Write a program in prolog to solve 4-Queens problem View Solution
7) Write a program in prolog to solve Traveling salesman problem View Solution
8) Write a program in prolog for Water jug problem View Solution