周光辉

导航

2020年3月28日

输入一段字符(只含有空格和字母,保证开头不为空格),里面有若干个字符串,求这些字符串的长度和,并输出最长字符串内容,如果有多个输出最先出现的那个字符串。以stop作为最后输入的字符串。

摘要: #include<stdio.h>#include<string.h>main(){ int i,j=0,m,count,max; char a[100]; while(1) { gets(a); count=0; max=0; if(strcmp(a,"stop")==0) break; for( 阅读全文

posted @ 2020-03-28 15:42 飞鸟然 阅读(3906) 评论(0) 推荐(1) 编辑