class ReverseNumber {
public static void main(String[] args) {
int input = 123;
int temp, r, output = 0;
temp = input;
while (temp > 0) {
r = temp % 10;
temp = temp / 10;
output = output * 10 + r;
}
System.out.println("Original Number : " + input);
System.out.println("Reverse Number : " + output);
}
}