判断一个字符串是否是回文。在主函数中调用一个字符串,调用自定义函数,输出结果。所谓回文是指顺肚倒读都一样的字符串。

测试输入:abcba

测试输出:是回文!

#include 
#include 
int hw(char *s)
{
    int flag=1;
        char *p,*q;
    for(p=s,q=s+strlen(s)-1;p

你可能感兴趣的:(算法,c语言)