C++ program for evaluating simple mathematical expressions