Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

class ReverseNum

{
public static void main(String args[])
{
int n = 123;
int rev=0;
int temp = n;
while(n>0)
{
remainder = n%10;
rev = rev*10 + remainder;
n = n/10;
}
}

}
}

You might also like