颠倒数字

int n = Convert.ToInt32(Console.ReadLine());
int m = n, x = 0;
while (m>0)
{
x = x * 10 + m % 10;
m /= 10;
}
Console.WriteLine(x);

posted @ 2018-04-07 14:43  v123ve  阅读(195)  评论(0)    收藏  举报