#include <stdio.h>
int main()
{
int y,a,b,c,x;
printf("输入一个3位整数:");
scanf("%d",&y);
a=y/100;
b=(y%100)/10;
c=y%10;
x=c*100+b*10+a;
printf("%d\n",x);
return 0;
}
输入一个3位整数:123
321
Program ended with exit code: 0