If we want to reverse an integer by C/C++, you must to use the following code block, which you can logically adapt to your app and represents a function:
int reverseint(int num_)
{
int inv; inv = 0;
while (num_>0)
{
inv = inv * 10 + (num_%10);
num_ = num_ / 10;
}
return inv;
}
This code is similar on another programming languages as C#, Java and Javascript.

Help


