Reverse the Number

Answer to this question was found on google search

-----------------------------------------------------

int  n, reverse=0, reminder;           

       Console.Write("Enter a number: ");      

       n= int.Parse(Console.ReadLine());     

       while(n!=0)      

       {      

        reminder=n%10;        

        reverse=reverse*10+reminder;      

        n/=10;      

       }      

       Console.Write("Reversed Number: "+reverse);       

-------------------------------------------------------------------------

Output:

Enter a number: 234  

Reversed Number: 432