Sunday, October 28, 2012

contoh la prolog



 menu :-
write('-------MENU-------'),nl,
write('1. silsilah'),nl,
write('2. Nilai'),nl,
write('3. EXIT'),nl,
write('Masukkan pilihan : '), read(PIL), nl,

(PIL=1,nl,

write('nama anda :'),read(G),nl,
KAKEK = ('slamet',G),
write('nama kakek anda:'),write(KAKEK),nl,


menu;
PIL=2,nl,
write('Nilai'),nl,
write('Masukkan Nilai uts : '),read(P),nl,
write('Masukkan Nilai uas : '),read(L),nl,
V is (P+L)/2,
write('nilai anda : '),write(V),nl,


menu;
PIL=3,nl,
write('Makasih'),nl).





No comments:

Post a Comment