#include <stdio.h> #include <string.h> int fh(char ab[]) { int len=strlen(ab),a=0; for(a=0;a<=len;a++) if(ab[a]!=ab[len-a-1]) return 0; return 1; } main() { char ab[20]; gets(ab); if(fh(ab)==1) printf("是回文字符串"); else printf("不是回文字符串"); getchar(); }
标签:ab,int,C语言,字符串,include,回文 From: https://www.cnblogs.com/xkdn/p/17067604.html