我是靠谱客的博主 彩色含羞草,这篇文章主要介绍pat-basic-1042-c语言,现在分享给大家,希望可以做个参考。

#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语言内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(117)

评论列表共有 0 条评论

立即
投稿
返回
顶部