n%10就是n的个位数了
include <stdio.h>void main(){int n,k,m=0;scanf("%d",&n);k=n;while(k){m=m*10+k%10;k/=10;}if(m==n) printf("是回文");else printf("不是回文");}//运行示例: