复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include<stdio.h> int main() { char str; int i,ch[128]={0},max,maxi; max=0; while((str=getchar())!='n') { if(str>='A'&&str<='Z') str=str+'a'-'A'; if(str>='a'&&str<='z') ch[str]++; } for(i=0;i<128;i++) { if(ch[i]>max) { max=ch[i]; maxi=i; } } printf("%c %d",maxi,max); return 0; }
最后
以上就是彩色含羞草最近收集整理的关于pat-basic-1042-c语言的全部内容,更多相关pat-basic-1042-c语言内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复