:- use_module(library(clpfd)). price(Price) :- domain([ZT,E],0,9), 72 * Price #= 10000 * ZT + 1230 + E, labeling([],[ZT,E]). % | ?- price(P). % P = 156 ? ; % ein Nougatei kostet 1,56 Euro