print spiral in c++