06 2012 档案

摘要:句子中的单词的查找先将每个单词存起来,然后逐个比较;并且把每个单词的长度存起来,会节省时间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 阅读(142) 评论(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 阅读(159) 评论(0) 推荐(0)
摘要:字符串处理,不过做的有点麻烦View Code 1 #include<stdio.h> 2 #include<string.h> 3 int main() 4 { 5 int n,i,j,k,x,len1,len2,count,y; 6 char str1[1000],str2[1000],str[1000]; 7 scanf("%d",&n); 8 getchar(); 9 while(n--)10 {11 gets(str1);12 gets(str2);13 len1=strlen(str1... 阅读全文
posted @ 2012-06-02 00:16 琳&leen 阅读(186) 评论(0) 推荐(0)