哪里出错了啦

发布时间:2019-07-29 16:17:09

#include <stdio.h>

#include <string.h>

#define N 100

int mian()

int f(char *x) 

{

char *y;

y = x; 

while(*y) 

y++;

y--; 

while(x<y)

{

if(*x!=*y)

return 0;

x++;

y--;

}

return 1;

}

int main(void)

{

char ch[N];

printf("请输入一个字符串:");

gets(ch); 

if(f(char *x))

printf("是回文\n");

else

printf("不是回文\n");

return 0;


补充:定义函数“int f(char *x)”,判断x所指的字符串是否为回文,若是则函数返回1,否则返回0。

推荐回答

程序有两个错,给你改好的

以上问题属网友观点,不代表本站立场,仅供参考!