How do you reverse an integer value (e.g. 1234 => 4321)
Sigiloso
I came up with a quicky but it has a problem, if the number ends with a "0", it wont print in the reversed number, will resort to some ugly hack thing for that. int reverseInt(int num) { int res = 0; do { res *= 10; res += (num % 10); num /= 10; } while (num > 0); return res; }