鱼C论坛

 找回密码
 立即注册
查看: 3548|回复: 6

关于C语言的一道题

[复制链接]
发表于 2013-12-3 12:45:36 | 显示全部楼层 |阅读模式
10鱼币
4.jpg
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2013-12-4 10:17:08 | 显示全部楼层
#include <stdio.h>
#include<string.h>
void main()
{
        char str[100];
        int i,j,t;
        gets(str);
        for (i=0,j=strlen(str)-1;i<(strlen(str)/2);i++,j--)
        {if(str[i]!=str[j])
        t=0;
        break;
        }
        if(t==0)
                printf("no\n");
        else
                printf("yes\n");
}
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2013-12-4 16:57:53 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-10-19 03:39

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表