统计字符出现的频度
#include<iostream>
#include<cstring>
using namespace std;
void count_character_frequency(char* str){
int ch[200] = {0};
for(int i = 0;i<strlen(str);i++){
int a = str[i];
ch[a]++;
}
for(int i = 48;i<=122;i++){
if(ch[i]!=0){
char c = i;
cout<<c<<":"<<ch[i]<<endl;
}
}
}
int main(){
char str[200];
while(cin>>str && str[0]!='0'){
count_character_frequency(str);
}
return 0;
}