→→
bool huiwen(int num) { int a=num; int rnum=0; while(a>0) { rnum=rnum*10+a%10; a=a/10; } return rnum==num; }
(其实我是从代码里抄下来的)嘻嘻