A
A
AK2018-05-02 18:09:27
Prolog
AK, 2018-05-02 18:09:27

Golden Ratio - Prolog?

Good day to all. You need to write a Prolog program that finds five points on a person's hand. The length of the first phalanx and the length of the second phalanx are given as initial data. Sketched something, of course, with errors. Tell me how to be?
5ae9d4a35cfbc742401237.png

main:-
predicates:
f(byte,word).
clauses:
f(1,10).
f(2,14).
f(N,F):-N1=N-1,f(N1,F1),N2=N1-1,f(N2,F2),F=F1+F2.
goal:
f(5,point).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question