can anyone help me to solve a logigram puzzle in prolog... i do not really know where to start.
what i did :
i created the variables.
i created the boxes in a database.
but after this i don't have a clue how to continue.
S E N D
M O R E
--------- +
M O N E Y
(different letter, different numbers)
splits([H|T], H, T).
splits([H|T], X, [H|TX]) :-
splits(T, X, TX).
oplossing([S,E,N,D,M,O,R,E,M,O,N,E,Y]) :-
splits([0,1,2,3,4,5,6,7,8,9], D, Ds),
splits(Ds, E, Es),
Y is (D+E) mod 10,
C1 is (D+E) div 10...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.