A C++ Program using arrray and cmath