
Save it into .pl extension

Figure 2.2
Then open the prolog, and consult the file..



To list all combination just type the queries, makan(X),minum(Y). Note it means give all posible makan and minum. (,) means "and". Don't forget to press semicolon (;) to view next combination.


Figure 2.4
Done.. Simple right? :)
Tidak ada komentar:
Posting Komentar