Welcome to my blog, hope you enjoy reading
RSS

Minggu, 08 November 2009

OPERATOR AND ARITHMETIC in Prolog

Now we have a program like this:

















Then we will convert the seven predicates used to operator form which will result the same as output from the program above.

Below is our new program:

















We can test our new program like this:



ARITMATCHICS OPERATOR
We have examples :
a. calculate an average from two numbers:




b. calculate the squareroot of their product:



c. Calculate the larger of X and Y:



Okey, not enough, but may usefull for us. Thank you and don't hasited give your comments.

Tidak ada komentar:

Posting Komentar