摘要: #include int main() { char str1[100],str2[100]; while(scanf("%s %s",&str1,&str2)!=EOF) { char tem[200]; int i=0,j=0,k=0; for (i=0;str1[i]!='\0';i++) t... 阅读全文
posted @ 2017-03-06 16:48 贱人郭 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main() { char *str=(char *)malloc(sizeof(char)); while(scanf("%s",str)!=EOF) { int len,i; len=strlen(str); bool flag=true; f... 阅读全文
posted @ 2017-03-06 14:48 贱人郭 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #include #include #include//三个头文件必不可少 int main() { char *str=(char *)malloc (sizeof(char));//char*必须分配内存 while(scanf("%s",str)!=EOF)//char*的scanf没有& { int i=0,count=0; int... 阅读全文
posted @ 2017-03-06 14:37 贱人郭 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 用了库函数strrev(*str),正确的结果,却是compile error,不能AC!!!!!!! 阅读全文
posted @ 2017-03-06 12:11 贱人郭 阅读(427) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main() { char *str=(char*)malloc (sizeof(char));//char*之前必须分配内存 while(scanf("%s",str)!=EOF)//注意此地不能用&str { char tem; int len =strlen(str); ... 阅读全文
posted @ 2017-03-06 11:57 贱人郭 阅读(395) 评论(0) 推荐(0) 编辑
摘要: #include int main() { char ch; while(true) { int z_cnt=0,o_cnt=0, j_cnt=0; while(scanf("%c",&ch)!=EOF) { if(ch=='E') return 0; if (ch=='\n') break;/... 阅读全文
posted @ 2017-03-06 11:32 贱人郭 阅读(156) 评论(0) 推荐(0) 编辑
摘要: #include int main() { int n; while(scanf("%d",&n)!=EOF) { while(n--) { int a,b,c,d; scanf("%d.%d.%d.%d",&a,&b,&c,&d); if ((a>-1 && a-1... 阅读全文
posted @ 2017-03-06 11:05 贱人郭 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 关于接收字符,我用的是输入到‘\0’就结束的策略; 其实,我最中意的是这种代码:转载自http://blog.csdn.net/mnmlist/article/details/25185563 阅读全文
posted @ 2017-03-06 11:03 贱人郭 阅读(182) 评论(0) 推荐(0) 编辑