int i = 1234; string s = i.ToString(); // Convert the int to a string string r = new string(s.Reverse().ToArray()); // Reverse the string int j = int.Parse(r); // Convert the reversed string to an int
int k = int.Parse(new string(i.ToString().Reverse().ToArray()));
int n = 456; int getnum= n; int rev = 0; while(getnum>0) { r = getnum% 10; rev = rev * 10 + r; left = getnum/ 10; //left = Math.floor(left / 10); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)