只需要判断num[0] ==num[2] && nun[0] != '0',如果满足,输出对称;不满足,输出不对称 (2)...
include<stdio.h> include <string> using namespace std;void PanDuan(){ int n;printf("请输入一个三位数\n");scanf("%3d",&n);char num[3];itoa(n,num,10);if (num[0]==num[2])printf("%s","对称");else printf("%s","不对称");} void main(){ PanDuan();} ...
charstr[10];scanf("%s",str);if(str[0]==str[2])printf("Yes\n");elseprintf("No\n");顺...
else printf("%d不是对称数", a);