#include <iostream>
#include <string>
#include <cstring>
//谢谢博友文章
using namespace std;
int main()
{
int zm[26];
memset(zm,0,sizeof(zm));
for(int i=0;i<4;i++)
{
string str;
getline(cin,str);
for(int j=0;j<str.size();j++)
{
if((str[j]>='A')&&(str[j]<='Z'))
{
zm[str[j]-'A']++;
}
}
}
int max=0;
for(int i=0;i<26;i++)
{
if(zm[i]>max)
{
max=zm[i];
}
}
for(int i=max;i>=1;i--)
{
for(int j=0;j<26;j++)
{
if(j!=25)
{
if(zm[j]>=i)
{
cout<<"* ";
}else
{
cout<<" ";
}
}else
{
if(zm[j]>=i)
{
cout<<"*";
}else
{
cout<<" ";
}
}
}
cout<<endl;
}
cout<<"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
return 0;
}
07-12
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交