Terminal calculator written in C++