24 game/Solve: Difference between revisions

Content added Content deleted
m (→‎{{header|Icon}} and {{header|Unicon}}: Regularize non-standard header markup)
Line 4,504: Line 4,504:
(((9 - 3) * 8) / 2)</pre>
(((9 - 3) * 8) / 2)</pre>


== {{header|Icon}} and {{header|Unicon}} ==
=={{header|Icon}} and {{header|Unicon}}==
This shares code with and solves the [[24_game#Icon_and_Unicon|24 game]]. A series of pattern expressions are built up and then populated with the permutations of the selected digits. Equations are skipped if they have been seen before. The procedure 'eval' was modified to catch zero divides. The solution will find either all occurrences or just the first occurrence of a solution.
This shares code with and solves the [[24_game#Icon_and_Unicon|24 game]]. A series of pattern expressions are built up and then populated with the permutations of the selected digits. Equations are skipped if they have been seen before. The procedure 'eval' was modified to catch zero divides. The solution will find either all occurrences or just the first occurrence of a solution.