define _CLANUAGE_
ifndef _CLANUAGE_
define _CLANUAGE_
include lt;stdlib.h;
include lt;stdio.h;
endif
ifndef _CPP_
define _CPP_
include lt;iostream;
using namespace std;
endif
/*
操作结果: 0-非回文,1是回文
*/
int hws(int n){
int sum = 0, m;
m = n;
while (m)
{
sum = sum * 10 + m % 10; // sum为反复取的个位数加上次的sum的10倍
m /= 10; // 反复缩小10倍
}
if (sum == n) return 1;
return 0;
}
void main(void){
if (hws(121)) coutlt;lt;;YES.\n;;
else coutlt;lt;;No.\n;;
system(;pause;);
}