Math Program Written on C++