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