Professional Documents
Culture Documents
Class Reversenum (Public Static Void Main (String Args ) (Int N 123 Int Rev 0 Int Temp N While (N 0) (Remainder N Rev Rev 10 + Remainder N N/10 ) )
Class Reversenum (Public Static Void Main (String Args ) (Int N 123 Int Rev 0 Int Temp N While (N 0) (Remainder N Rev Rev 10 + Remainder N N/10 ) )
{
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;
}
}
}
}