$ pl Welcome to SWI-Prolog (Multi-threaded, Version 5.6.24) Copyright (c) 1990-2006 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). ?- ['crypto.pro']. % gv.pro compiled 0.00 sec, 3,112 bytes % combosets.pro compiled 0.01 sec, 7,360 bytes % crypto.pro compiled 0.01 sec, 21,560 bytes Yes ?- demo. Problem: numbers = {5,3,15,6,7} and goal = 3 Solution: (15/ ((5 +3) - (6 +7))) Yes ?- demo. Problem: numbers = {9,7,3,0,0} and goal = 2 Solution: ((9 -7) + (0* (3 +0))) Yes ?- demo. Problem: numbers = {15,1,6,4,13} and goal = 10 Solution: ((15 +1) - (13* (6 -4))) Yes ?- demo. Problem: numbers = {1,8,6,11,11} and goal = 15 Solution: ((6 +11) - (11- (1 +8))) Yes ?- demo. Problem: numbers = {4,13,0,8,9} and goal = 3 Solution: ((4 +0) / (9- (13 +8))) Yes ?- demo. Problem: numbers = {5,11,15,0,5} and goal = 9 Solution: ((5 -11) - (5/ (15 +0))) Yes ?- demo. Problem: numbers = {4,11,7,14,9} and goal = 0 Solution: (9* ((7 -14) - (4 -11))) Yes ?- demo. Problem: numbers = {12,9,2,5,4} and goal = 11 Solution: (4+ ((12 +9) / (2 -5))) Yes ?- demo. Problem: numbers = {5,4,3,6,1} and goal = 7 Solution: ((3 -6) + (1+ (5 +4))) Yes ?-