The 24 Game is a road trip game for math whizzes. The goal of the game is to be the first person in the car to "make 24" from license plates that can be seen from the car. To make 24 from a license plate, a player must do the following:
Some variants of the game allow for the use of logical operations, such as bitwise AND, bitwise OR, XOR, etc. However, these additional operations are usually reserved for when there is no solution using only the four basic functions. So, a player who uses logical operations when a more basic solution exists is usually mocked.
This program plays the 24 Game. Give it the text of any license plate (alphabetic characters are ignored and therefore optional), set your options, and declare victory over your opponents. Just remember to give credit for the victory, lest you be find out and booted from the vehicle. C-style syntax is used for all operators. See the Wikipedia page on C/C++ operators if you don't understand the syntax.