摘要: 句子中的单词的查找先将每个单词存起来,然后逐个比较;并且把每个单词的长度存起来,会节省时间View Code 1 #include <stdio.h> 2 #include <string.h> 3 struct node 4 { 5 char s[105]; 6 int num; 7 }a[25]; 8 int main() 9 {10 int m, n, max, i, j, k, len, flag, x, p=1;11 char str[25][100], c[100];12 int b[25];13 while(scanf("%d%d... 阅读全文
posted @ 2012-06-04 01:14 琳&leen 阅读(138) 评论(0) 推荐(0)
摘要: ASCII的问题,注意一行一输出View Code 1 #include <stdio.h> 2 #include <string.h> 3 #include <math.h> 4 int main() 5 { 6 char str[15],ex[15]; 7 int len, flag, i, sum, k, h, j; 8 for(i=0;i<11;i++) 9 ex[i]='_';10 ex[i]='\0';11 gets(str);12 if(strcmp(str,ex)==0)13 {14 15 whi... 阅读全文
posted @ 2012-06-04 01:10 琳&leen 阅读(157) 评论(0) 推荐(0)