Alphanumeric calculator c c++ code

Calculators with Arithmatic operators such + – / * are designed using postfix notation. Ever wonder how you can code a calculator that can accept alphabetical operators such as plus, minus, divide and multiply in addition to +  – / and * respectively? Here is a how to code a calculator with alphanumeric operators.


2 + 54 / 55 * 223 – 44

can also be written as

2 plus 54 / 55 multiply 223 minus 44

Interesting isn’t it?

You can find more details about postfix notation by Googling it.

C++ Alphanumeric Code Example

You can compile the above code and run the binary. You can modify above code in any way you like. For exercise purposes I would recommend you to write a java version of the above code.

If you like it, please share it with your friends.