#include<stdio.h>
int Reverse(unsigned int s)
{
int a = 0;
while(s != 0){a = a * 10 + s % 10;
s = s/10;
}
return a;
}
void main()
{
int i;
scanf("%d",&i);
printf("%d",Reverse(i));
}
p122.14. 逆转
最新推荐文章于 2024-07-01 18:07:37 发布
#include<stdio.h>
int Reverse(unsigned int s)
{
int a = 0;
while(s != 0){a = a * 10 + s % 10;
s = s/10;
}
return a;
}
void main()
{
int i;
scanf("%d",&i);
printf("%d",Reverse(i));
}