Logo 
Search:

Artificial Intelligence Articles

Submit Article
Home » Articles » Artificial Intelligence » ProLogRSS Feeds

Prolog program of Fibonacci Series

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

Prolog program of Fibonacci Series......

Code for Prolog program of Fibonacci Series in Artificial Intelligence

domains
    num,ans=integer.
predicates
    fibo(num).
clauses
    fibo(1):-write("1").
    fibo(X):- X<5,!,
          fibo(X1 +1),
             Ans=X1+X.
  
Share: 


Didn't find what you were looking for? Find more on Prolog program of Fibonacci Series Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of Prolog program of Fibonacci Series 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!