首页 > 编程语言 > 详细

C语言 回文

时间:2017-01-04 12:46:40      阅读:229      评论:0      收藏:0      [点我收藏+]
 1 #include <stdio.h>
 2 #include <string.h>
 3 int main()
 4 {
 5     char s[80];
 6     int i,j;
 7     printf("Please input the string:\n");
 8     gets(s);
 9     j=strlen(s)-1;
10     for(i=0;i<j;i++,j--)
11         if(s[i]!=s[j])
12             break;
13     if(i<j)
14         printf("No");
15     else
16         printf("Yes");
17     return 0;
18 }

 

C语言 回文

原文:http://www.cnblogs.com/jianf/p/6248134.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!