Figure 2.1.Save it into .pl extension

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


Figure 2.3To 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