include<stdio.h>void reverse(int n){while(n%10==0)n/=10; while(n>0) {printf("%d",n%10); n/=10; }}int main(){int n; scanf("%d",&n); reverse(n); return 0; }
include <stdio.h> void main(){ int n,s=0;printf("请输入一个整数:");scanf("%d",&n);while(n!=0){ s=s*10+n%10;n/=10;} printf("%d",s);}