- 博客(1)
- 收藏
- 关注
原创 编写一个函数,判断一个字符串是否回文,是为yes ,否为no
编写一个函数,判断一个字符串是否回文,是为yes ,否为no #include<stdio.h> #include<string.h> int fun(char *a) { int i,n,count=0; n=strlen(a)-1; {for(i=1;i<=n/2;i++) if(a[i]a[n-i]) count++; } if(countn/2) return 1; if(count!=n/2) return 0; } int main() {char a[50];
2020-05-15 21:12:52
4138
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人