http://ac.jobdu.com/problem.php?pid=1098
#include<stdio.h>
#include<string.h>int main()
{
int i,count[1000];
char c,s[1000];
while(scanf("%s",s)!=EOF){
memset(count,0,sizeof(count));
for(i=0;i<strlen(s);i++){
if(s[i]>='A' && s[i]<='Z') count[s[i]]++;
}
for(c='A';c<='Z';c++) printf("%c:%d\n",c,count[c]);
}
system("pause");
return 0;
}