Logo 
Search:

Artificial Intelligence Articles

Submit Article
Home » Articles » Artificial Intelligence » ProLogRSS Feeds

ProLog Program to add and multiply numbers

Posted By: Milind Mishra     Category: Artificial Intelligence     Views: 7142

Program to add and multiply numbers........

Code for ProLog Program to add and multiply numbers in Artificial Intelligence

domains
   product, sum = integer

predicates
   add(sum, sum, sum)
   multiply(product, product, product)

clauses
   add(X, Y, Sum) :- Sum = X + Y.
   multiply(X, Y, Product) :- Product = X * Y.
  
Share: 


Didn't find what you were looking for? Find more on ProLog Program to add and multiply numbers Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of ProLog Program to add and multiply numbers is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!