MAD…..Math_C

We are NOT MAD! but we are Member At Discrete Math C….

  • Calendar

    Desember 2009
    S S R K J S M
    « Nov    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Arsip

  • Iklan

INPUT and OUTPUT in Prolog ch.2

Posted by madmathc pada Desember 22, 2009

Now we continue to explain other numbers in Practical Exercise INPUT and OUTPUT in Prolog

(2) First, type this in notepadand save it.

Then type this to make rule for Prolog. Save it ang don’t forget to add .pl at the end of your filename.

Next consult it. After that, type this…

?-copyterms(‘in.txt’,’out.txt’).

and press Enter

Then automatically out.txt appears… Open it. This is the layout…

(3) Type it in testa.txt

Type this rule. Save it and give name readfile.pl

After that, consult it. Next type this…

?-readfile(‘testa.txt’).

Then the output is

This session will be continued at next post. thank for coming…:-)

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s

 
%d blogger menyukai ini: