?- consult('crypto.pro'). true. ?- display_bindings. lo: 0 hi: 9 true. ?- solve_one. Problem : numbers = {2, 3, 4, 3, 4} and goal = 1 Solution: ( ( 4 - ( 2 + 3 ) ) * ( 4 - 3 ) ) true . ?- display_bindings. lo: 0 hi: 9 crypto_problem: problem(numbers(2,3,4,3,4),goal(1)) solution: solution(ex(ex(4,-,ex(2,+,3)),*,ex(4,-,3))) true. ?- demo(10). Problem : numbers = {5, 2, 9, 0, 2} and goal = 4 Solution: ( ( 9 + 0 ) + ( 2 - ( 5 + 2 ) ) ) Problem : numbers = {3, 7, 6, 1, 5} and goal = 9 Solution: ( ( 6 + 1 ) + ( 5 / ( 3 + 7 ) ) ) Problem : numbers = {8, 5, 4, 0, 0} and goal = 5 Solution: ( ( 5 + 0 ) + ( 0 * ( 8 + 4 ) ) ) Problem : numbers = {0, 7, 2, 0, 7} and goal = 8 No solution to this problem. Problem : numbers = {3, 6, 8, 6, 5} and goal = 9 Solution: ( ( 6 - ( 3 + 6 ) ) * ( 8 - 5 ) ) Problem : numbers = {8, 7, 6, 3, 7} and goal = 9 Solution: ( 3 / ( ( 8 + 7 ) - ( 6 * 7 ) ) ) Problem : numbers = {9, 1, 3, 7, 4} and goal = 7 Solution: ( ( 3 * 7 ) - ( 4 + ( 9 + 1 ) ) ) Problem : numbers = {1, 5, 7, 7, 7} and goal = 3 Solution: ( ( 7 + 7 ) / ( 7 * ( 1 + 5 ) ) ) Problem : numbers = {9, 6, 9, 9, 6} and goal = 0 Solution: ( ( 9 - 9 ) * ( 6 + ( 9 + 6 ) ) ) Problem : numbers = {6, 3, 4, 8, 6} and goal = 8 Solution: ( ( 6 + 3 ) / ( 6 * ( 4 + 8 ) ) ) true . ?- display_bindings. lo: 0 hi: 9 crypto_problem: problem(numbers(6,3,4,8,6),goal(8)) solution: solution(ex(ex(6,+,3),/,ex(6,*,ex(4,+,8)))) true. ?- solve(problem(numbers(1,2,3,4,5),goal(6))). Problem : numbers = {1, 2, 3, 4, 5} and goal = 6 Solution: ( ( 1 + 2 ) * ( 5 - ( 3 + 4 ) ) ) true . ?- display_bindings. lo: 0 hi: 9 crypto_problem: problem(numbers(1,2,3,4,5),goal(6)) solution: solution(ex(ex(1,+,2),*,ex(5,-,ex(3,+,4)))) true. ?- solve(problem(numbers(0,0,0,0,7),goal(8))). Problem : numbers = {0, 0, 0, 0, 7} and goal = 8 No solution to this problem. true . ?- display_bindings. lo: 0 hi: 9 crypto_problem: problem(numbers(0,0,0,0,7),goal(8)) solution: solution(none) true. ?- halt.