simple 3d calulator c++