文章
11
粉丝
0
获赞
15
访问
880
#include<stdio.h>
#include <iostream>
#include<math.h>
#include <stdlib.h>
#include <string>
#include<cctype>
#include<algorithm>
using namespace std;
int main ()
{
string str1;
int arr[100]={0};
getline(cin,str1);
for(int i=0;i<str1.size();i++)
{
if((str1[i]>='A'&&str1[i]<='Z')||(str1[i]>='a'&&str1[i]<='z'))
{
str1[i]=tolower(str1[i]);
int j=str1[i]-'a';
arr[j]++;
}
}
int max=arr[0];
...
登录后发布评论
暂无评论,来抢沙发