1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-23 15:48:42 +00:00
202401-programming-assignments/【额外练习】选择结构/7-27 选择-回文数.c

25 lines
372 B
C
Raw Normal View History

2024-10-30 15:00:18 +00:00
#include <stdio.h>
int main() {
int n;
int a, b, c, d, e, f, g;
scanf("%d", &n);
a = n / 1000000;
b = n / 100000 % 10;
c = n / 10000 % 10;
d = n / 1000 % 10;
e = n / 100 % 10;
f = n / 10 % 10;
g = n % 10;
if (a == g && b == f && c == e) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}