文章
36
粉丝
0
获赞
5
访问
22.9k
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
int main(void) {
char s[1000];
char s1[]={'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'};
while(gets(s)!=NULL){
for(int i=0;i<strlen(s1);i++){
int ans=0;
for(int j=0;j<strlen(s);j++){
if(s1[i]==s[j]) ans++;
}
printf("%c:%d\n",s1[i],ans);
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发