24 game/Solve: Difference between revisions

→‎{{header|J}}: add example with brackets
(→‎{{header|J}}: add example with brackets)
Line 147:
answer 8 4 7 1
8*7-4*1
answer 1 1 2 7
(1+2)*1+7
 
The answer will be either a suitable J sentence or blank if none can be found. This means that, for example, the sentence <code>8*7-4*1</code> is equivalent to the sentence <code>8*(7-(4*1))</code>. [Many infix languages use operator precedence to make polynomials easier to express without parenthesis, but J has other mechanisms for expressing polynomials and minimal operator precedence makes the language more regular.]
 
=={{header|Mathematica}}==
892

edits