Files
2025-03-06 22:46:33 +08:00

29 lines
434 B
C

/*-------------------------------------------------------
输入一个整数,判断是否为回文数(所谓回文数就是左右对称的数)
(注:使用while循环)
-------------------------------------------------------*/
#include <stdio.h>
main()
{
int n,t,s;
s=0;
scanf("%d",&n);
t=n;
/**********Program**********/
while(n){
s*=10;
s+=n%10;
n/=10;
}
/********** End **********/
if( t==s )
printf("yes\n");
else
printf("no\n");
}