bool symmetry(long a)
{
long i,temp;
temp=0,i=a;
while(i)
{
temp=10*temp+i%10;
i=i/10;
}
return (temp==a);
}
int _tmain(int argc, char* argv[])
{
long i=12345;
cout<<symmetry(i)<<endl;
return 0;
}
posted on 2012-09-01 21:03
qiushao 阅读(192)
评论(0) 编辑 收藏 引用