Home | Site Map
Sunlight

Countdown

Introduction

Countdown is a solver for 'Countdown'-style problems, where a target number is given along with a set of 6 numbers, the object being to achieve the target number using the given numbers once only, and any of the operators +, -, *, /. It illustrates the principles of RPN stack evaluation.

Countdown Code Notes

You can download a Zip file of the source code, including a Microsoft Visual C++ project you can use to build the project.

Things to note:

  • The program builds an RPN stack the 'wrong' way - rather than building it up from an expression, it builds all the possible expressions. It then evaluates the stack. 

Countdown Download

Source code (4k): CountdownSrc.zip

Executable (44k): Countdown.exe