Daftar Blog Saya

Selasa, 15 Desember 2009

FP 2

How to list all possible combination (consisting two elements) of a set in PROLOG
The steps
1. Write the source in notepad and then save as “a.pl”, e.g.:






2. Open the SWI PROLOG and load the source “a.pl”
3.. To combine the two sets (hewan and tuan) write this command
“hewan(X),tuan(Y).”




4. To show the another result, press “;”. It will become like this


Tidak ada komentar:

Posting Komentar