reverse a number in c++